ilovin / lstm_ctc_ocr

Use CTC + tensorflow to OCR
https://ilovin.github.io/2017-04-06/tensorflow-lstm-ctc-ocr/
354 stars 140 forks source link

ImportError: No module named utils.data_util #41

Closed gccrpm closed 6 years ago

gccrpm commented 6 years ago

hi, @ilovin when i run train.sh ,i got an error:

STM_train --cfg=./lstm/lstm.yml --restore=0 /usr/local/lib/python2.7/dist-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Traceback (most recent call last): File "./lstm/train_net.py", line 11, in from lib.lstm.train import train_net File "./lstm/../lib/lstm/init.py", line 9, in from . import train File "./lstm/../lib/lstm/train.py", line 8, in from lib.lstm.utils.gen import get_batch File "./lstm/../lib/lstm/utils/gen.py", line 13, in from lib.utils.data_util import GeneratorEnqueuer ImportError: No module named utils.data_util

ilovin commented 6 years ago

In the README: python3

gccrpm commented 6 years ago

hi @ilovin , thank you for your response ,now i use anaconda3 when run ./train.sh ,i got output like this:

Tensor("data:0", shape=(?, ?, 32), dtype=float32) Tensor("Reshape:0", shape=(?, ?, 512), dtype=float32) Tensor("time_step_len:0", shape=(?,), dtype=int32) Use network LSTM_train in training 2018-02-07 11:42:23.810111: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX FMA done Solving...

and then it seems to stop here ,can you give me some advice ,or before run train.sh ,something i need to do

ilovin commented 6 years ago
  1. run the 'gen.py' and check whether the image is generated properly
  2. reduce the 'DISPLAY' parameter in 'lstm/lstm.yml'