Open
Description
When I start 'python train.py', the process stopped at position'***', which meant it output 1 but no further output 2. I am puzzled with the problem in 'nn.Conv2()' . Why the problem comes up with that and How can I solve it?
def vgg(cfg, i, batch_norm=False):
layers = []
in_channels = i
for v in cfg:
if v == 'M':
layers += [nn.MaxPool2d(kernel_size=2, stride=2)]
elif v == 'C':
layers += [nn.MaxPool2d(kernel_size=2, stride=2, ceil_mode=True)]
else:
print('1')
*** conv2 = nn.Conv2d(in_channels, v, kernel_size=3, padding=1)
print('2')
if batch_norm:
layers += [conv2, nn.BatchNorm2d(v), nn.ReLU(inplace=True)]
else:
layers += [conv2, nn.ReLU(inplace=True)]
in_channels = v
Metadata
Metadata
Assignees
Labels
No labels