0
私はAlex GordanのAttention_ocrプロジェクトに取り組んでいます。 私はアレックスのanswerに従って、ガイドに従ってデータをFSNS形式で保存しています。トラッキング時にInvalidArgumentErrorが発生するAttention_ocr:Assignに両テンソルのシェイプが一致する必要があります
しかし、私は、コマンドを実行すると: パイソンtrain.py --dataset_name = rctw
エラーが発生すると、エラーメッセージは次のように示しています
Caused by op u'save/Assign_175', defined at:
File "train.py", line 209, in <module>
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 "train.py", line 205, in main
train(total_loss, init_fn, hparams)
File "train.py", line 153, in train
init_fn=init_fn)
File "/usr/lib/python2.7/site-packages/tensorflow/contrib/slim/python/slim/learning.py", line 688, in train
saver = saver or tf_saver.Saver()
File "/usr/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1040, in __init__
self.build()
File "/usr/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1070, in build
restore_sequentially=self._restore_sequentially)
File "/usr/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 675, in build
restore_sequentially, reshape)
File "/usr/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 414, in _AddRestoreOps
assign_ops.append(saveable.restore(tensors, shapes))
File "/usr/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 155, in restore
self.op.get_shape().is_fully_defined())
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/gen_state_ops.py", line 47, in assign
use_locking=use_locking, name=name)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
op_def=op_def)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2327, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1226, in __init__
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [3794,3506] rhs shape= [422,134]
[[Node: save/Assign_175 = Assign[T=DT_FLOAT, _class=["loc:@AttentionOcr_v1/sequence_logit_fn/SQLR/LSTM/attention_decoder/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](AttentionOcr_v1/sequence_logit_fn/SQLR/LSTM/attention_decoder/weights/Momentum, save/RestoreV2_175/_15)]]
[[Node: save/RestoreV2_141/_168 = _Send[T=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_715_save/RestoreV2_141", _device="/job:localhost/replica:0/task:0/cpu:0"](save/RestoreV2_141)]]
私がしておりますので、使用パイソン/データセット/のFSN私のrctw.pyを作成し、それをfsnsとしてデータセット/ init.pyにインクルードすると、なぜこのエラーが発生するのですか?おそらくあなたのプロジェクトにハードコードがいくつかあるので、彼らは常に "134文字セット"と呼んでいます。
著者や他の人の反応に期待しています。