Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x,y,lb = train_data
- features_placeholder = tf.placeholder(tf.float32, shape=[None,None],name="input_features")
- labels_placeholder = tf.placeholder(tf.float32, shape=[None,1],name = "input_labels")
- iterator = (tf.data.Dataset.from_tensor_slices((features_placeholder, labels_placeholder))
- .apply(sliding.sliding_window_batch(timestep=100, stride=1))
- .batch(10)
- .make_initializable_iterator()
- )
- next_element = iterator.get_next(name="batch")
- init_op = iterator.initializer
- saveable = tf.contrib.data.make_saveable_from_iterator(iterator)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement