You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Training model but get error message - ImportError: No module named inception #706
Similar issue when I run Tensorflow Serving with inception_export.py.
~/serving$ py inception_export.py --checkpoint_dir=inception-v3 --export_dir=inception-export
Traceback (most recent call last):
File "inception_export.py", line 32, in
from inception import inception_model
ImportError: No module named 'inception'
check 1:
Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information. import tensorflow ... (ok no error)
`` import inception
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named 'inception'
`from inception import inception`
`Traceback (most recent call last):`
` File "", line 1, in `
`ImportError: No module named 'inception'`
check2: $ ls /usr/local/lib/python3.4/dist-packages/tensorflow/models/
embedding image init.py pycache rnn
So, it seems missing the "model" in "tensorflow-0.12.0rc0-cp34-cp34m-linux_x86_64.whl" ?
update: I have try tensorflow-0.10..whl and tensorflow-0.11..whl still no inception module.
(Someone say it can be solved by rebuild from source of TF. I will try it then report here.)
update: I have get the source from git clone https://github.com/tensorflow/tensorflow ls tensorflow/models/ embedding image __init__.py rnn
So, the 'inception' is not include in the TF source.
(I will try to add inception manually then see what happens...)
update: Added 'inception model' in the /serving then ~/serving$ py inception_export.py --checkpoint_dir=inception-v3 --export_dir=inception-export
WARNING:tensorflow:tf.op_scope(values, name, default_name) is deprecated, use tf.name_scope(name, default_name, values) WARNING:tensorflow:tf.variable_op_scope(values, name, default_name) is deprecated, use tf.variable_scope(name, default_name, values) WARNING:tensorflow:tf.op_scope(values, name, default_name) is deprecated, use tf.name_scope(name, default_name, values) WARNING:tensorflow:tf.variable_op_scope(values, name, default_name) is deprecated, use tf.variable_scope(name, default_name, values) Traceback (most recent call last): File "inception_export.py", line 170, in <module> tf.app.run() File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "inception_export.py", line 166, in main export() File "inception_export.py", line 80, in export logits, _ = inception_model.inference(images, NUM_CLASSES + 1) File "/home/wei/serving/inception/inception_model.py", line 87, in inference scope=scope) File "/home/wei/serving/inception/slim/inception_model.py", line 87, in inception_v3 scope='conv0') File "/home/wei/serving/inception/slim/scopes.py", line 155, in func_with_args return func(*args, **current_args) File "/home/wei/serving/inception/slim/ops.py", line 234, in conv2d outputs = batch_norm(conv, **batch_norm_params) File "/home/wei/serving/inception/slim/scopes.py", line 155, in func_with_args return func(*args, **current_args) File "/home/wei/serving/inception/slim/ops.py", line 111, in batch_norm collections=moving_collections) File "/home/wei/serving/inception/slim/scopes.py", line 155, in func_with_args return func(*args, **current_args) File "/home/wei/serving/inception/slim/variables.py", line 289, in variable trainable=trainable, collections=collections) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 1024, in get_variable custom_getter=custom_getter) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 850, in get_variable custom_getter=custom_getter) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 346, in get_variable validate_shape=validate_shape) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 331, in _true_getter caching_device=caching_device, validate_shape=validate_shape) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 677, in _get_single_variable expected_shape=shape) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variables.py", line 224, in __init__ expected_shape=expected_shape) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variables.py", line 327, in _init_from_args initial_value(), name="initial_value", dtype=dtype) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 665, in <lambda> shape.as_list(), dtype=dtype, partition_info=partition_info) TypeError: ones_initializer() got multiple values for argument 'dtype'
It's all I can do but no luck.
Activity
poxvoculi commentedon Dec 2, 2016
Please include all the information requested in the new issues template.
vscv commentedon Dec 3, 2016
Similar issue when I run Tensorflow Serving with inception_export.py.
~/serving$
py inception_export.py --checkpoint_dir=inception-v3 --export_dir=inception-exportTraceback (most recent call last):
File "inception_export.py", line 32, in
from inception import inception_model
ImportError: No module named 'inception'
then I found the installation NOT include the "inception model" see https://github.com/tensorflow/models:
Install TF:
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0rc0-cp34-cp34m-linux_x86_64.whlsudo pip3 install --upgrade $TF_BINARY_URLcheck 1:
Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
import tensorflow... (ok no error)``
import inceptionTraceback (most recent call last):
File "", line 1, in
ImportError: No module named 'inception'
`from inception import inception`
`Traceback (most recent call last):`
` File "", line 1, in `
`ImportError: No module named 'inception'`
check2:
$ ls /usr/local/lib/python3.4/dist-packages/tensorflow/models/embedding image init.py pycache rnn
So, it seems missing the "model" in "tensorflow-0.12.0rc0-cp34-cp34m-linux_x86_64.whl" ?
update: I have try tensorflow-0.10..whl and tensorflow-0.11..whl still no inception module.
(Someone say it can be solved by rebuild from source of TF. I will try it then report here.)
update: I have get the source from
git clone https://github.com/tensorflow/tensorflowls tensorflow/models/embedding image __init__.py rnnSo, the 'inception' is not include in the TF source.
(I will try to add inception manually then see what happens...)
update: Added 'inception model' in the /serving then
~/serving$ py inception_export.py --checkpoint_dir=inception-v3 --export_dir=inception-exportWARNING:tensorflow:tf.op_scope(values, name, default_name) is deprecated, use tf.name_scope(name, default_name, values) WARNING:tensorflow:tf.variable_op_scope(values, name, default_name) is deprecated, use tf.variable_scope(name, default_name, values) WARNING:tensorflow:tf.op_scope(values, name, default_name) is deprecated, use tf.name_scope(name, default_name, values) WARNING:tensorflow:tf.variable_op_scope(values, name, default_name) is deprecated, use tf.variable_scope(name, default_name, values) Traceback (most recent call last): File "inception_export.py", line 170, in <module> tf.app.run() File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "inception_export.py", line 166, in main export() File "inception_export.py", line 80, in export logits, _ = inception_model.inference(images, NUM_CLASSES + 1) File "/home/wei/serving/inception/inception_model.py", line 87, in inference scope=scope) File "/home/wei/serving/inception/slim/inception_model.py", line 87, in inception_v3 scope='conv0') File "/home/wei/serving/inception/slim/scopes.py", line 155, in func_with_args return func(*args, **current_args) File "/home/wei/serving/inception/slim/ops.py", line 234, in conv2d outputs = batch_norm(conv, **batch_norm_params) File "/home/wei/serving/inception/slim/scopes.py", line 155, in func_with_args return func(*args, **current_args) File "/home/wei/serving/inception/slim/ops.py", line 111, in batch_norm collections=moving_collections) File "/home/wei/serving/inception/slim/scopes.py", line 155, in func_with_args return func(*args, **current_args) File "/home/wei/serving/inception/slim/variables.py", line 289, in variable trainable=trainable, collections=collections) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 1024, in get_variable custom_getter=custom_getter) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 850, in get_variable custom_getter=custom_getter) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 346, in get_variable validate_shape=validate_shape) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 331, in _true_getter caching_device=caching_device, validate_shape=validate_shape) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 677, in _get_single_variable expected_shape=shape) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variables.py", line 224, in __init__ expected_shape=expected_shape) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variables.py", line 327, in _init_from_args initial_value(), name="initial_value", dtype=dtype) File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/variable_scope.py", line 665, in <lambda> shape.as_list(), dtype=dtype, partition_info=partition_info) TypeError: ones_initializer() got multiple values for argument 'dtype'It's all I can do but no luck.
vscv commentedon Dec 14, 2016
11days ago...
Thanks :)
martinwicke commentedon Dec 14, 2016
The tensorflow installation does not include this model. You have to clone the models repo (this one) and run the scripts from its directory.