Closed Naruto-Sasuke closed 7 years ago
maybe the sequence length = 0? does the 'train' and the 'val' folder has the correct path?
Aha, my bad. I run it in the path of lstm_ocr and when I change ../train
to ./train
, it turns out fine.
if you don't have further questions, plz close the issue
I try code of master branch, and it errors like this: =============================begin training============================= Traceback (most recent call last): File "./standard/lstm_ocr.py", line 203, in
train(train_dir='../train',val_dir='../val')
File "./standard/lstm_ocr.py", line 142, in train
val_inputs,val_seq_len,val_labels=val_feeder.input_index_generate_batch()
File "/home/yan/lstm_ctc_ocr-master/standard/utils.py", line 112, in input_index_generate_batch
batch_labels = sparse_tuple_from_label(label_batch)
File "/home/yan/lstm_ctc_ocr-master/standard/utils.py", line 143, in sparse_tuple_from_label
shape = np.asarray([len(sequences), np.asarray(indices).max(0)[1]+1], dtype=np.int64)
File "/home/yan/anaconda3/lib/python3.6/site-packages/numpy/core/_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity