Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

program stop at nn.Conv2d(...) #573

Open
EsakaK opened this issue Mar 13, 2022 · 0 comments
Open

program stop at nn.Conv2d(...) #573

EsakaK opened this issue Mar 13, 2022 · 0 comments

Comments

@EsakaK
Copy link

EsakaK commented Mar 13, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant