I'm trying to use the following code (that I found in Tensorflow tutorials here) to read the data from a CSV file:
def get_dataset(file_path, **kwargs):
dataset = tf.data.experimental.make_csv_dataset(
file_path,
batch_size=5, # Artificially small to make examples easier to show.
label_name=LABEL_COLUMN,
na_value="?",
num_epochs=1,
ignore_errors=True,
**kwargs)
return dataset
It works fine when you have one column as the label column. However, in my CSV file I have multiple columns as labels (I have 1008 features and 2 columns as labels). I'm wondering how I can read my data using this make_csv_dataset.
Thank you!