Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. import tensorflow_datasets as tfds
  2.  
  3. SPLIT_WEIGHTS = (8, 1, 1)
  4. splits = tfds.Split.TRAIN.subsplit(weighted=SPLIT_WEIGHTS)
  5. (raw_train, raw_validation, raw_test), metadata = tfds.load(name="tf_flowers",
  6. with_info=True,
  7. split=list(splits),
  8. # specifying batch_size=-1 will load full dataset in the memory
  9. # batch_size=-1,
  10. # as_supervised: `bool`, if `True`, the returned `tf.data.Dataset`
  11. # will have a 2-tuple structure `(input, label)`
  12. as_supervised=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement