subramanyamdvss/UnsupNTS

RuntimeError: Calculated padded input size per channel (discriminator)

elahimanesh opened this issue · 1 comments

Dear
The following error occurs when I set "enable_mgan" parameter as true randomly and at different times.

STEP 6400 x 36 no of loggers 6
time for 100 steps : 294.9260549545288 sec
.
.
.
File "...\UnsupNTS\undreamt\undreamt\discriminator.py", line 63, in forward
x = [F.relu(conv(x)).squeeze(3) for conv in self.convs1] # [(N, Co, W), ...]*len(Ks)
File "...\UnsupNTS\undreamt\undreamt\discriminator.py", line 63, in
x = [F.relu(conv(x)).squeeze(3) for conv in self.convs1] # [(N, Co, W), ...]*len(Ks)
File "...\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "...\torch\nn\modules\conv.py", line 343, in forward
return self.conv2d_forward(input, self.weight)
File "...\torch\nn\modules\conv.py", line 340, in conv2d_forward
self.padding, self.dilation, self.groups)

RuntimeError: Calculated padded input size per channel: (4 x 600). Kernel size: (5 x 600). Kernel size can't be greater than actual input size

This is because the decoder has predicted the attention vectors so small that the discriminator is flagging them to be incompatible with the convolutional kernel. This error occurs only if the code is not run in a compatible pytorch version. Please run the code in pytorch 0.3.1.