Imported from https://github.com/wacr2008/tensorflow_crnn