awslabs / handwritten-text-recognition-for-apache-mxnet

This repository lets you train neural networks models for performing end-to-end full-page handwriting recognition using the Apache MXNet deep learning frameworks on the IAM Dataset.
Apache License 2.0
481 stars 189 forks source link

Train on IAMDataset "Word" Crashes the code #45

Closed vdinesh18 closed 4 years ago

vdinesh18 commented 4 years ago

Hello, I have a need to train the model with words. Can you please help me?

I tried by updating the code with max_seq_len =96 as "jonomon" mentioned but it crashes with error DeferredInitializationError: Parameter 'cnnbilstm0_hybridsequential1_hybridsequential0_encoderlayer0_lstm0_l0_i2h_weight' has not been initialized yet because initialization was deferred. Actual initialization happens during the first forward pass. Please pass one batch of data through the network before accessing Parameters. You can also avoid deferred initialization by specifying in_units, num_features, etc., for network layers.

During handling of the above exception, another exception occurred:

vdinesh18 commented 4 years ago

Hey John, I was able to figure out. .size of features in CNNBiLSTM.hybrid_forward was a problem and it worked for me when i set max_seq_len =64