You get the error in the title if you run the below code, which I believe should not happen. The step that “causes” the error is y.transpose(1,2) – for some reason pytorch doesn’t like the 1st and 2nd dimension being transposed here. but the underlying issue appears to be with how the bias is being added (if I do bias = False the error goes away.)
import torch
import torch.nn as nn
k = 2
w,h,d = 1, 1, 1
x = torch.zeros((10, 1, w, h, d))
c = torch.nn.ConvTranspose3d(1, 2, k)
y = c(x).contiguous()
y = y.reshape(1, 10, 2, k*w, k*h, k*d).contiguous()
y = y.transpose(1, 2).contiguous()
hub = nn.SmoothL1Loss()
l = hub(y, torch.zeros(y.shape))
l.backward()