Tensorflow: TypeError: zeros_initializer () hat mehrere Werte für das Schlüsselwortargument 'dtype' erhalten.

Erstellt am 14. Feb. 2017  ·  3Kommentare  ·  Quelle: tensorflow/tensorflow

Ich versuche, verteiltes Lernen aus dem Tutorial Inception in TensorFlow durchzuführen

Umgebung
_Parameter Server_
Betriebssystem: Ubuntu 16.04 LTS
Tensorflow: r 0,12
Python: 2.7.12

_Arbeiter_
Betriebssystem: CentOS 7
Tensorflow: r 0,12
Python: 2.7.5
GPU-Karte: 2 * GTX NVIDIA 1080

aber ich habe diesen Fehler bekommen:

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'

Ich habe das folgende Problem zuvor überprüft

( TypeError: ones_initializer () hat beim Ausführen des inception_train # 5742 mehrere Werte für das Schlüsselwortargument 'dtype' erhalten. )

aber es scheint nicht sehr gut zu funktionieren

Irgendeine Idee? Danke!

awaiting response bug

Hilfreichster Kommentar

Lösung: https://github.com/tensorflow/tensorflow/issues/6202#issuecomment -267445372 (gefunden durch Suchen Ihres Problemtitels auf github)

Alle 3 Kommentare

Lösung: https://github.com/tensorflow/tensorflow/issues/6202#issuecomment -267445372 (gefunden durch Suchen Ihres Problemtitels auf github)

Hallo @yaroslavvb ,


Meine Umgebungsinformationen
_Parameter Server_
Betriebssystem: Ubuntu 16.04 LTS
Tensorflow: r 0,12
Python: 2.7.12

_Arbeiter_
Betriebssystem: CentOS 7
Tensorflow: r 0,12
Python: 2.7.5
GPU-Karte: 2 * GTX NVIDIA 1080


Ich habe die Datei von ops.py bereits überprüft und mein Code hier ist

initializer=tf.ones_initializer()

Das Problem scheint also nicht der Initialisierer zu sein ()
Das ist der Grund, warum ich um Hilfe rufe: P.
Soll ich initializer=tf.constant_initializer() ?


EDIT: Ich werde meine Firewall des Arbeiters überprüfen, um zu sehen, ob etwas passiert

Dieses Tutorial wurde am 20. Januar auf die neue TF1.0-API aktualisiert. Https://github.com/tensorflow/models/commit/e5079c839058ff40dcbd15515a9cfb462fabbc2a

Sie müssen auf eine neuere Version von TensorFlow aktualisieren, um diesen Code ohne Änderungen verwenden zu können.

Bitte öffnen Sie erneut, wenn dies Ihr Problem nicht behebt.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen