I had a similar error, and in my case, the problem was with the batch norm layer after the upconv. For others running to such error, double-check that your batch norm is using the correct number of features.