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

error!!!!!!!!!!!!!!!!!!!! #6

Open
ami66 opened this issue Feb 23, 2021 · 1 comment
Open

error!!!!!!!!!!!!!!!!!!!! #6

ami66 opened this issue Feb 23, 2021 · 1 comment

Comments

@ami66
Copy link

ami66 commented Feb 23, 2021

when I first step to run the model.py, An error occurred:

The size of tensor a (196) must match the size of tensor b (256) at non-singleton dimension 1

@leaderj1001
Copy link
Owner

Hi, Thanks for comments !
You need to use same size of resolution parameters.

def ResNet50(num_classes=1000, resolution=(224, 224)):
    return ResNet(Bottleneck, [3, 4, 6, 3], num_classes=num_classes, resolution=resolution)


def main():
    model = ResNet50()
    x = torch.randn([2, 3, 224, 224])
    print(model(x).size())
    print(get_n_params(model))

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

2 participants