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

No module named models.BNN_cifar10 #12

Open
xiaoyang666 opened this issue Nov 6, 2018 · 5 comments
Open

No module named models.BNN_cifar10 #12

xiaoyang666 opened this issue Nov 6, 2018 · 5 comments

Comments

@xiaoyang666
Copy link

No description provided.

@xiaoyang666
Copy link
Author

I find the good way to solve ts problem. Thank you

@MaxwellWjj
Copy link

I find the good way to solve ts problem. Thank you

Hello, Can you please tell me how to solve this problem? I found that the error seems to occur in main.py:
if not gfile.Exists(FLAGS.checkpoint_dir):
# gfile.DeleteRecursively(FLAGS.checkpoint_dir)
gfile.MakeDirs(FLAGS.checkpoint_dir)
model_file = os.path.join('models', FLAGS.model + '.py')
assert gfile.Exists(model_file), 'no model file named: ' + model_file
gfile.Copy(model_file, FLAGS.checkpoint_dir + '/model.py')
(IDE: Spyder)

@mehreenjabeen
Copy link

got below error upon executing "python main.py --model BNN_cifar10 --save BNN_cifar10 --dataset cifar10 --gpu True"
Traceback (most recent call last):
File "main.py", line 240, in
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "main.py", line 229, in main
m = importlib.import_module('.' +FLAGS.model, 'models')
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named models.BNN_cifar10

@mehreenjabeen
Copy link

I find the good way to solve ts problem. Thank you

can u plz explain how

@mengwanguc
Copy link

mengwanguc commented Nov 24, 2018

I find the good way to solve ts problem. Thank you

can u plz explain how

I solved it by adding "__init__.py" in models. You can google "__init__.py" for more details. Hope it helps.

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

4 participants