Closed qwzhong1988 closed 6 years ago
Thanks for noting this.
The answer is: Yes, most likely. This calculation was authored before I changed the model architecture as presently reflected. (I never regenerated the tfrecords, because it's time and disk intensive.)
I believe the present version is no less conservative, in that it discards images with sequence lengths that are too short to produce the necessary character output. Moreover, the kernel sizes differ, too.
It's something worth fixing. I'll close this when I get around to verifying the proper equivalence. (A pull request would be welcome as well, though not essential.)
Fixed in commit 02f8f26212f33158978742c57f5bc1a52801cab7 Merge of the complete overhaul represented by that branch is forthcoming.
seq_lens = [calc_seq_len( w ) for w in range( 1024 )] raise error when image_width > 1024 while I regenerate some Chinese characters tfrecord. Can I change 1024 to 2048 safely?
Yes, I don't see that causing any problem.
hi, calculating sequence length in calc_seq_len() (mjsynth-tfrecord.py) should be the same with convnet_layers() (model.py)? may be like this: