Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert numpy array to tfrecord and back

tensor = tf.convert_to_tensor(np.random.random(size=(5,5,2)))
result = tf.io.serialize_tensor(tensor).numpy()
result = tf.io.parse_tensor(result, out_type=tf.float64).numpy()
result
 
PREVIOUS NEXT
Tagged: #convert #numpy #array #tfrecord
ADD COMMENT
Topic
Name
4+5 =