原因:
两个地方里面的包的版本不一致。
需要一个一个检查版本:比如python的版本,torch的版本。
out = F.conv2d(input=x, weight=weights, bias=b, stride=1, padding=1) # out: (1, unit_channel, l, d)
RuntimeError: Expected 4-dimensional input for 4-dimensional weight [256, 2, 3, 3], but got 3-dimensional input of size [2, 200, 300] instead