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

Some questions on running other modules #5

Closed
lizxchen opened this issue Jul 30, 2018 · 3 comments
Closed

Some questions on running other modules #5

lizxchen opened this issue Jul 30, 2018 · 3 comments

Comments

@lizxchen
Copy link

1、'VGG' object has no attribute 'module'
2、Given input size: (128, 3, 3). Calculated output size: (1, -1, -1). Output size is too small.
what i should do?thanks a lot.

@rdcolema
Copy link
Owner

Hey, can you provide line numbers or a more verbose traceback? Just want to make sure I can see where that's happening. I'm guessing it's something with pytorch versions since I haven't updated this repo in a long time.

@lizxchen
Copy link
Author

AttributeError Traceback (most recent call last)
in ()
----> 1 main(mode="train")

in main(mode, resume)
98 return
99
--> 100 optimizer = optim.Adam(model.module.fc.parameters(), lr, weight_decay=1e-4)
101
102 for epoch in range(epochs):

~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py in getattr(self, name)
396 return modules[name]
397 raise AttributeError("'{}' object has no attribute '{}'".format(
--> 398 type(self).name, name))
399
400 def setattr(self, name, value):

AttributeError: 'VGG' object has no attribute 'module'

@rdcolema
Copy link
Owner

rdcolema commented Aug 1, 2018

What's the output of model_names in the second cell? Also just to confirm, you don't have any folders or installed packages that might have a namespace conflict with VGG?

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