f2073333b710a340403843763ba60eb1e6699916,examples/data_process/tutorial_tfrecord2.py,,,#,81
Before Change
//// Use shuffle_batch or batch
// see https://www.tensorflow.org/versions/master/api_docs/python/io_ops.html//shuffle_batch
img_batch, label_batch = tf.train.shuffle_batch([img, label], batch_size=4, capacity=50000, \
min_after_dequeue=10000, num_threads=1)
print("img_batch : %s" % img_batch.shape)
print("label_batch : %s" % label_batch.shape)
// init = tf.global_variables_initializer()
After Change
label_batch = tf.cast(features["label"], tf.int32)
yield img_batch, label_batch
img_batch, label_batch = next(read_and_decode("train.tfrecords"))
print("img_batch : %s" % img_batch.shape)
print("label_batch : %s" % label_batch.shape)
i = 0

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: tensorlayer/tensorlayer
Commit Name: f2073333b710a340403843763ba60eb1e6699916
Time: 2019-04-11
Author: rundi_wu@pku.edu.cn
File Name: examples/data_process/tutorial_tfrecord2.py
Class Name:
Method Name:
Project Name: OpenNMT/OpenNMT-py
Commit Name: 8dafc3f2382cbfb939e530e3227a154699645159
Time: 2018-01-17
Author: nasa4836@gmail.com
File Name: train.py
Class Name:
Method Name: main
Project Name: tensorlayer/tensorlayer
Commit Name: f2073333b710a340403843763ba60eb1e6699916
Time: 2019-04-11
Author: rundi_wu@pku.edu.cn
File Name: examples/data_process/tutorial_tfrecord.py
Class Name:
Method Name: