Last active
March 17, 2018 18:59
-
-
Save tgamauf/69ec66a1257c00ee6765841c4286c1dd to your computer and use it in GitHub Desktop.
Use of tf.train.FeatureList
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
movie_1_actors = tf.train.Feature( | |
bytes_list=tf.train.BytesList( | |
value=[b'Tim Robbins', b'Morgan Freeman'])) | |
movie_2_actors = tf.train.Feature( | |
bytes_list=tf.train.BytesList( | |
value=[b'Brad Pitt', b'Edward Norton', b'Helena Bonham Carter'])) | |
movie_actors_list = [movie_1_actors, movie_2_actors] | |
movie_actors = tf.train.FeatureList(feature=movie_actors_list) | |
# Short form | |
movie_names = tf.train.FeatureList(feature=[ | |
tf.train.Feature(bytes_list=tf.train.BytesList( | |
value=[b'The Shawshank Redemption', b'Fight Club'])) | |
]) | |
movie_ratings = tf.train.FeatureList(feature=[ | |
tf.train.Feature(float_list=tf.train.FloatList( | |
value=[9.7, 9.0])) | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment