88b164b98c209ea8e2afbfae93a01b9aacd8b0ab,tools/train_shadownet.py,,train_shadownet,#Any#Any#Any#Any#,65
Before Change
// decode the tf records to get the training data
decoder = data_utils.TextFeatureIO(char_dict_path=ops.join(cfg.PATH.CHAR_DICT_DIR, "char_dict.json"),
ord_map_dict_path=ops.join(cfg.PATH.CHAR_DICT_DIR, "ord_map.json")).reader
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)
After Change
decoder = data_utils.TextFeatureIO(char_dict_path=ops.join(cfg.PATH.CHAR_DICT_DIR, "char_dict.json"),
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()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
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: tensorflow/datasets
Commit Name: da7c8af137d3380a772e06aeb9bdb6529671fa3f
Time: 2020-04-16
Author: epot@google.com
File Name: tensorflow_datasets/testing/test_utils.py
Class Name:
Method Name: features_encode_decode
Project Name: deepchem/deepchem
Commit Name: 03ef391a07e08eefce7299f3a934b49505c5be16
Time: 2017-03-06
Author: lilleswing@gmail.com
File Name: examples/pdbbind/pdbbind_datasets.py
Class Name:
Method Name: featurize_pdbbind