Update media_sequence.md

This commit is contained in:
Allen Day 2020-01-28 17:50:36 +08:00 committed by GitHub
parent d144e564d8
commit 17ff6cdcc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,11 +89,14 @@ process new data sets, in the documentation of
dataset = d.as_dataset('test') dataset = d.as_dataset('test')
# implement additional processing and batching here # implement additional processing and batching here
dataset_output = dataset.make_one_shot_iterator().get_next() dataset_output = dataset.make_one_shot_iterator().get_next()
images = dataset_output=['images'] images = dataset_output['images']
labels = dataset_output=['labels'] labels = dataset_output['labels']
with tf.Session() as sess: print('The shape of images is %s' % str(images))
images_, labels_ = sess.run(images, labels) print('The shape of labels is %s' % str(labels))
with tf.compat.v1.Session() as sess:
images_, labels_ = sess.run([images, labels])
print('The shape of images_ is %s' % str(images_.shape)) print('The shape of images_ is %s' % str(images_.shape))
print('The shape of labels_ is %s' % str(labels_.shape)) print('The shape of labels_ is %s' % str(labels_.shape))
``` ```