Zhen Hao
Zhen Hao

Reputation: 1

TensorFlow: How to create custom "wine_quality" dataset from "csv"?

I found it extremely difficult to create a custom dataset that can be used to replace the wine_quality dataset from tensorflow_datasets so that I can reuse other code with my own data:

import tensorflow_datasets as tfds

dataset = tfds.load(name="wine_quality", as_supervised=True, split="train")

After loading, the wine_quality dataset:

Type: PrefetchDataset

String form: <PrefetchDataset shapes: ({alcohol: (), chlorides: (), citric acid: (), density: (), fixed acidit <...> ulphates: tf.float64, total sulfur dioxide: tf.float32, volatile acidity: tf.float32}, tf.int32)> Length: 4898 File:
c:\users\haozhen\miniconda3\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py

Docstring: A Dataset that asynchronously prefetches its input. Init docstring: See Dataset.prefetch() for details.

Args: input_dataset: The input dataset. buffer_size: See Dataset.prefetch() for details. slack_period: (Optional.) An integer. If non-zero, determines the number of GetNext calls before injecting slack into the execution. This may reduce CPU contention at the start of a step. Note that a tensorflow user should not have to set this manually; enable this behavior automatically via tf.data.Options.experimental_slack instead. Defaults to None.

How can I create my own wine_quality dataset from csv?

Upvotes: 0

Views: 167

Answers (1)

user11530462
user11530462

Reputation:

Please visit below link to get details on creating custom Dataset through TFDS CLI. https://www.tensorflow.org/datasets/add_dataset

Upvotes: 0

Related Questions