tomowang / id-card-ocr

1 stars 0 forks source link

train #1

Open upupbo opened 5 years ago

upupbo commented 5 years ago

cb@ceo-pc:~/code/ocr1/id-card-ocr-master$ python train.py /home/cb/anaconda3/lib/python3.6/site-packages/torch/nn/modules/rnn.py:522: RuntimeWarning: RNN module weights are not part of single contiguous chunk of memory. This means they need to be compacted at every call, possibly greatly increasing memory usage. To compact weights again call flatten_parameters(). self.dropout, self.training, self.bidirectional, self.batch_first) Traceback (most recent call last): File "train.py", line 133, in train('nation') File "train.py", line 118, in train cost = train_batch(crnn, train_iter) File "train.py", line 103, in train_batch cost = criterion(preds, text, preds_size, length) / batch_size File "/home/cb/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/home/cb/anaconda3/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 1332, in forward self.zero_infinity) File "/home/cb/anaconda3/lib/python3.6/site-packages/torch/nn/functional.py", line 1813, in ctc_loss zero_infinity) RuntimeError: input_lengths needs to have size to match batch_size

tomowang commented 5 years ago

nation and gender will use basic CNN model to train