I am working on Alex Gordan's Attention_ocr project. I have follow the guide and store my data in FSNS format acoording to Alex's answer.
However, when I run command: python train.py --dataset_name=rctw
Error occurs and error message shows as follow:
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)]]
Since I have use python/datasets/fsns.py as the example to create my rctw.py, and include it in datasets/init.py as fsns, why this error occurs? Maybe there is some hardcode in your project so they always call "134 charset"
Hope for author or anyother's response.