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

I receive Error for "model.py" #11

Closed
VahidChahkandi opened this issue Jun 11, 2020 · 2 comments
Closed

I receive Error for "model.py" #11

VahidChahkandi opened this issue Jun 11, 2020 · 2 comments

Comments

@VahidChahkandi
Copy link

Hi, first of all, thank you for sharing your code.
could you please advise what I have to do when receiving this error when one class called "model.py".

line 265, in
args.block_cls = model.HighwayBlock
NameError: name 'model' is not defined

Thank you in advance.

@mansimov
Copy link
Collaborator

Hi,
It sounds like an error importing the class.
Did you make sure that you have imported model.py ?

@VahidChahkandi
Copy link
Author

Yes, I'm sure and that makes me surprised!
"model.py" is a python file contain HighwayBlock class and some other classes and I put that in the same folder that run.py is, but the error says there is no model.py file.
Those lines that cause of this error is as follows:

if args.ffw_block == "nonresidual": args.block_cls = model.NonresidualBlock elif args.ffw_block == "residual": args.block_cls = model.ResidualBlock elif args.ffw_block == "highway": args.block_cls = model.HighwayBlock

Hi,
It sounds like an error importing the class.
Did you make sure that you have imported model.py ?

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