TF

Import data

1. Dataset & iterator

tf.data.Dataset = a sequence of elements

tf.data.Iterator = extract elements from a dataset

2. Load data

dataset1 = tf.data.Dataset.from_tensor_slices(tf.random_uniform([4, 10]))
print(dataset1.output_types)  # ==> "tf.float32"
print(dataset1.output_shapes)  # ==> "(10,)"


dataset2 = tf.data.Dataset.from_tensor_slices(
       (
              tf.random_uniform([4]),
              tf.random_uniform([4, 100], maxval=100, dtype=tf.int32)
       )
)
print(dataset2.output_types)  # ==> "(tf.float32, tf.int32)"
print(dataset2.output_shapes)  # ==> "((), (100,))"

3. Transformation

4. Iterator

Eager Execution

Some functions

get_global_step

tf.train.Saver

Output

to screen

tensorboard

Last updated

Was this helpful?