I'm trying to do distributed learning from tutorial Inception in TensorFlow
Environment
_Parameter Server_
Operating system : Ubuntu 16.04 LTS
Tensorflow : r 0.12
python : 2.7.12
_Worker_
Operating system : CentOS 7
Tensorflow : r 0.12
python : 2.7.5
GPU card : 2 * GTX NVIDIA 1080
but i got this error :
Traceback (most recent call last):
File "/home/paslab/tensorflow-models/inception/bazel-bin/inception/imagenet_distributed_train.runfiles/inception/inception/imagenet_distributed_train.py", line 66, in <module> tf.app.run()
File "/usr/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "/home/paslab/tensorflow-models/inception/bazel-bin/inception/imagenet_distributed_train.runfiles/inception/inception/imagenet_distributed_train.py", line 62, in main inception_distributed_train.train(server.target, dataset, cluster_spec)
File "/home/paslab/tensorflow-models/inception/bazel-bin/inception/imagenet_distributed_train.runfiles/inception/inception/inception_distributed_train.py", line 120, in train global_step = slim.variables.global_step()
File "/home/paslab/tensorflow-models/inception/bazel-bin/inception/imagenet_distributed_train.runfiles/inception/inception/slim/scopes.py", line 155, in func_with_args return func(*args, **current_args)
File "/home/paslab/tensorflow-models/inception/bazel-bin/inception/imagenet_distributed_train.runfiles/inception/inception/slim/variables.py", line 244, in global_step trainable=False, collections=collections)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 987, in get_variable custom_getter=custom_getter)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 889, in get_variable custom_getter=custom_getter)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 347, in get_variable validate_shape=validate_shape)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 332, in _true_getter caching_device=caching_device, validate_shape=validate_shape)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 683, in _get_single_variable validate_shape=validate_shape)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 226, in __init__ expected_shape=expected_shape)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 303, in _init_from_args initial_value(), name="initial_value", dtype=dtype)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 672, in <lambda> shape.as_list(), dtype=dtype, partition_info=partition_info)
TypeError: zeros_initializer() got multiple values for keyword argument 'dtype'
I checked the following issue before
but it seems not working very well
Any idea? Thx!
Solution: https://github.com/tensorflow/tensorflow/issues/6202#issuecomment-267445372 (found by searching your issue title on github)
Hi @yaroslavvb ,
My environment info
_Parameter Server_
Operating system : Ubuntu 16.04 LTS
Tensorflow : r 0.12
Python : 2.7.12
_Worker_
Operating system : CentOS 7
Tensorflow : r 0.12
Python : 2.7.5
GPU card : 2 * GTX NVIDIA 1080
I already checked the file of ops.py, and my code here is
initializer=tf.ones_initializer()
So the problem seems not the initializer()
That's the reason i call for help :P
Should i use initializer=tf.constant_initializer()
?
EDIT : I'll check my firewall of worker, see if anything happen
This tutorial was updated to the new TF1.0 API on Jan 20th https://github.com/tensorflow/models/commit/e5079c839058ff40dcbd15515a9cfb462fabbc2a
You will need to upgrade to a newer version of TensorFlow to use this code without modification.
Please re-open if this does not fix your problem.
Most helpful comment
Solution: https://github.com/tensorflow/tensorflow/issues/6202#issuecomment-267445372 (found by searching your issue title on github)