Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. x,y,lb = train_data
  2.  
  3. features_placeholder = tf.placeholder(tf.float32, shape=[None,None],name="input_features")
  4. labels_placeholder = tf.placeholder(tf.float32, shape=[None,1],name = "input_labels")
  5.  
  6. iterator = (tf.data.Dataset.from_tensor_slices((features_placeholder, labels_placeholder))
  7. .apply(sliding.sliding_window_batch(timestep=100, stride=1))
  8. .batch(10)
  9. .make_initializable_iterator()
  10. )
  11. next_element = iterator.get_next(name="batch")
  12. init_op = iterator.initializer
  13. saveable = tf.contrib.data.make_saveable_from_iterator(iterator)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement