Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tensorflow_datasets as tfds
- SPLIT_WEIGHTS = (8, 1, 1)
- splits = tfds.Split.TRAIN.subsplit(weighted=SPLIT_WEIGHTS)
- (raw_train, raw_validation, raw_test), metadata = tfds.load(name="tf_flowers",
- with_info=True,
- split=list(splits),
- # specifying batch_size=-1 will load full dataset in the memory
- # batch_size=-1,
- # as_supervised: `bool`, if `True`, the returned `tf.data.Dataset`
- # will have a 2-tuple structure `(input, label)`
- as_supervised=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement