Easter2
Easter2 copied to clipboard
Changing Input Image size
I am trying to reduce the image size from (2000, 80) [default] to (1000, 80) and have set LONG_LINES augmentation to False. I am getting the following error.
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: sequence_length(0) <= 250 [[node functional_3/ctc/CTCLoss (defined at easter_model.py:33) ]] (1) Invalid argument: sequence_length(0) <= 250 [[node functional_3/ctc/CTCLoss (defined at easter_model.py:33) ]] [[functional_3/ctc/CTCLoss/_154]] 0 successful operations. 0 derived errors ignored. [Op:__inference_train_function_11028]
Do I need to change something in the model to make it work? Please help. TIA
Hey @saurabhiit2007 , Thanks for trying our Easter. For image_width=2000, compatible output shape is : 500 If you are reducing it to 1000, you should also change Output shape to 250. Kindly try it out and let us know if anything doesn't work.
Thanks @kartikgill for your response. Just for my understanding, does Output shape refers to the maximum number of characters that can be present in the input word/line? And if the input data is at word level then the input size can further be reduced with the corresponding change in the Output shape? TIA
Hey @saurabhiit2007 ,
Output shape refers to maximum number of output character tokens from model. It should be strictly greater than you maximum output length. For more info read this - https://sid2697.github.io/Blog_Sid/algorithm/2019/11/04/Beam-search.html