Skip to content
Snippets Groups Projects
Commit 79cb3334 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Change feature name

parent b82ad522
Branches
Tags
1 merge request!15Updates
...@@ -62,7 +62,7 @@ class TFRecord(object): ...@@ -62,7 +62,7 @@ class TFRecord(object):
def create_placeholders(self): def create_placeholders(self):
feature = {'train/image': tf.FixedLenFeature([], tf.string), feature = {'train/data': tf.FixedLenFeature([], tf.string),
'train/label': tf.FixedLenFeature([], tf.int64)} 'train/label': tf.FixedLenFeature([], tf.int64)}
# Define a reader and read the next record # Define a reader and read the next record
...@@ -75,7 +75,7 @@ class TFRecord(object): ...@@ -75,7 +75,7 @@ class TFRecord(object):
features = tf.parse_single_example(serialized_example, features=feature) features = tf.parse_single_example(serialized_example, features=feature)
# Convert the image data from string back to the numbers # Convert the image data from string back to the numbers
image = tf.decode_raw(features['train/image'], tf.float32) image = tf.decode_raw(features['train/data'], tf.float32)
# Cast label data into int32 # Cast label data into int32
label = tf.cast(features['train/label'], tf.int64) label = tf.cast(features['train/label'], tf.int64)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment