da03 / Attention-OCR

Visual Attention based OCR
MIT License
1.11k stars 362 forks source link

toy跑不起来 #97

Open wyfSunflower opened 5 years ago

wyfSunflower commented 5 years ago

according to toy example, I run python src/launcher.py --phase=train --data-path=sample/sample.txt --data-base-dir=sample --log-path=log.txt --no-load-model it throw such error: module 'tensorflow.contrib.rnn.python.ops.rnn_cell' has no attribute '_linear then I modiify code according @masonsun in #71 ,it throw such error: input_tensor dim: (?, 1, 32, ?) CNN outdim before squeeze: (?, 1, ?, 512) CNN outdim: (?, ?, 512) Traceback (most recent call last): File "src/launcher.py", line 146, in main(sys.argv[1:], exp_config.ExpConfig) File "src/launcher.py", line 142, in main session = sess) File "/home/gml/Documents/Attention-OCR/src/model/model.py", line 151, in init use_gru = use_gru) File "/home/gml/Documents/Attention-OCR/src/model/seq2seq_model.py", line 87, in init single_cell = tf.contrib.rnn.core_rnn_cell.BasicLSTMCell(attn_num_hidden, forget_bias=0.0, state_is_tuple=False) AttributeError: module 'tensorflow.contrib.rnn' has no attribute 'core_rnn_cell' What should I do? I use tf with version of 1.12.0

gabrielziegler3 commented 4 years ago

Have you solved this one yet? @wyfSunflower I am also having the same issue