Mostafa Shmaisani
Mostafa Shmaisani

Reputation: 11

Colab disconnecting when extracting dataset

# Get TensorFlow Datasets
import tensorflow_datasets as tfds
datasets_list = tfds.list_builders() # get all available datasets in TFDS
print("food101" in datasets_list) # is the dataset we're after available?

(train_data, test_data), ds_info = tfds.load(name="food101", # target dataset to get from TFDS
                                             split=["train", "validation"], # what splits of data should we get? note: not all datasets have train, valid, test
                                             shuffle_files=True, # shuffle files on download?
                                             as_supervised=True, # download data in tuple format (sample, label), e.g. (image, label)
                                             with_info=True) # include dataset metadata? if so, tfds.load() returns tuple (data, ds_info)

Source here

All didn't work

I want to find a way to keep the extraction, or a way to use the dataset another than using tensorflow datasets, the screenshot below shows the commands I wrote.

Upvotes: 1

Views: 56

Answers (0)

Related Questions