Belval / CRNN

A TensorFlow implementation of https://github.com/bgshih/crnn
MIT License
297 stars 101 forks source link

Unable to run `python3 run.py -ex ../data/test --test --restore` #61

Closed mrtpk closed 4 years ago

mrtpk commented 4 years ago

When python3 run.py -ex ../data/test --test --restore is excecuted, below error is raised: tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [512,71] rhs shape= [512,70]. This error is raised at the line self.saver.restore(self.session, ckpt). This might be due to a difference in model implementation and checkpoint.

https://github.com/Belval/CRNN/blob/da15fb3d9eb629e612a5c77ddc05435d8d6aaac1/CRNN/crnn.py#L73

Belval commented 4 years ago

That is caused by the ampersand (&) that was added to the CHAR_VECTOR variable in config.py. If you remove it, you should be able to load the model.

mrtpk commented 4 years ago

Thanks for the quick response- It solved the issue.