models icon indicating copy to clipboard operation
models copied to clipboard

The imagenet_distributed_train script is not compatible with the latest tensorflow (1.0.0)

Open bkovalev opened this issue 9 years ago • 2 comments

TensorFlow 1.0 last, CUDA 8, bazel 0.4.4

The imagenet_distributed_train script is not compatible with the latest tensorflow (1.0.0). When you try to run it as in tutorial it fails with the following error message: Traceback (most recent call last): File "/root/models-update-models-1.0/inception/bazel-bin/inception/imagenet_distributed_train.runfiles/inception/inception/imagenet_distributed_train.py", line 65, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "/root/models-update-models-1.0/inception/bazel-bin/inception/imagenet_distributed_train.runfiles/inception/inception/imagenet_distributed_train.py", line 61, in main inception_distributed_train.train(server.target, dataset, cluster_spec) File "/root/models-update-models-1.0/inception/bazel-bin/inception/imagenet_distributed_train.runfiles/inception/inception/inception_distributed_train.py", line 203, in train variables_to_average=variables_to_average) TypeError: init() got an unexpected keyword argument 'replica_id'

How to solve it?

bkovalev avatar Mar 07 '17 17:03 bkovalev

In file inception_distributed_train.py if the following line is commented out it seems to work.

200 replica_id=FLAGS.task_id, 200 #replica_id=FLAGS.task_id,

manjunaths avatar Mar 09 '17 13:03 manjunaths

Glad you find it... replica_id is only used in the old sync_rep optimizers so it is safe to remove it for the new one. Can you send over the PR to change that please? Thanks.

jmchen-g avatar Mar 10 '17 00:03 jmchen-g