charlesC
charlesC

Reputation: 71

tensorflow-dataset- How to make our own dataset with tfds format?

From a TensorFlow tutorial , I came across a code that load dataset from TensorFlow dataset.

dataset, metadata = tfds.load('cycle_gan/horse2zebra',
                              with_info=True, as_supervised=True)
train_horses, train_zebras = dataset['trainA'], dataset['trainB']
test_horses, test_zebras = dataset['testA'], dataset['testB']

However, I want to load my own dataset that is not from TensorFlow dataset. After collecting my own dataset, I had no idea how to load my dataset and process it to the same format as TensorFlow tfds.

Anyone can teach me how to do that? My dataset folder also has the same format : trainA, trainB , testA , testB.

Upvotes: 7

Views: 6407

Answers (1)

gogasca
gogasca

Reputation: 10058

Please follow this tutorial to add a dataset to TFDS.

https://github.com/tensorflow/datasets/blob/master/docs/add_dataset.md

Upvotes: 2

Related Questions