88b164b98c209ea8e2afbfae93a01b9aacd8b0ab,tools/train_shadownet.py,,train_shadownet,#Any#Any#Any#Any#,65
Before Change
images, labels, imagenames = decoder.read_features(ops.join(cfg.PATH.TFRECORDS_DIR, "train_feature.tfrecords"),
num_epochs=None, input_size=cfg.ARCH.INPUT_SIZE,
input_channels=cfg.ARCH.INPUT_CHANNELS)
inputdata, input_labels, input_imagenames = tf.train.shuffle_batch(
tensors=[images, labels, imagenames], batch_size=cfg.TRAIN.BATCH_SIZE,
capacity=1000 + 2*cfg.TRAIN.BATCH_SIZE, min_after_dequeue=100, num_threads=num_threads)
inputdata = tf.cast(x=inputdata, dtype=tf.float32)
// initialise the net model
After Change
ord_map_dict_path=ops.join(cfg.PATH.CHAR_DICT_DIR, "ord_map.json")).reader
dataset = tf.data.TFRecordDataset(cfg.PATH.TFRECORDS_DIR)
dataset = dataset.batch(cfg.TRAIN.BATCH_SIZE, drop_remainder=True)
dataset = dataset.map(decoder.extract_features_batch, num_parallel_calls=num_threads)
// dataset = dataset.apply(tf.contrib.data.map_and_batch(map_func=decoder.extract_features,
// batch_size=config.cfg.TRAIN.BATCH_SIZE,
// num_parallel_batches=num_threads,
// drop_remainder=True))
dataset = dataset.apply(tf.contrib.data.shuffle_and_repeat(cfg.TRAIN.BATCH_SIZE*num_threads*16))
dataset = dataset.prefetch(buffer_size=cfg.TRAIN.BATCH_SIZE*num_threads)
iterator = dataset.make_one_shot_iterator()
input_images, input_labels, input_image_names = iterator.get_next()
// initialise the net model
shadownet = crnn_model.ShadowNet(phase="Train",
hidden_nums=cfg.ARCH.HIDDEN_UNITS,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: MaybeShewill-CV/CRNN_Tensorflow
Commit Name: 88b164b98c209ea8e2afbfae93a01b9aacd8b0ab
Time: 2018-09-28
Author: debenito@unternehmertum.de
File Name: tools/train_shadownet.py
Class Name:
Method Name: train_shadownet
Project Name: weinman/cnn_lstm_ctc_ocr
Commit Name: 96fad3497a4373cc289f9e7c4272d4722a22f381
Time: 2018-06-20
Author: am.lamsal@gmail.com
File Name: src/mjsynth.py
Class Name:
Method Name: threaded_input_pipeline
Project Name: emedvedev/attention-ocr
Commit Name: 6096c0e6ec4df6a902747059a47e0f6f1bec7d77
Time: 2017-07-21
Author: edward.medvedev@gmail.com
File Name: aocr/util/data_gen.py
Class Name: DataGen
Method Name: gen