Build a Datapipeline with multiple CSV-Files
Budget: €8 – €30 EUR
I'm tying to feed my keras-modell with multiple csv-files. I think i need a generator to read batches from my dataset to train the model. The task is to fix/complete the code to work properly.
My dataset code seems like this:
myfiles_path ="/traindata/*.csv"
dataset = tf.data.experimental.make_csv_dataset(myfiles_path, batch_size=128, field_delim=",", num_epochs=1, select_colums=["Var1","Var2","Var3","Var4"], label_name="Var4")
input_shape= (3,)
model=Sequential()
model.add(Dense)(1, input_shape= input_shape)
model.add(Dense)(5, activation='relu')
model.add(Dense)(1, activation='linear')
model.summary()
model.compile(....)
h= model.fit(dataset, epochs=5)
My dataset code seems like this:
myfiles_path ="/traindata/*.csv"
dataset = tf.data.experimental.make_csv_dataset(myfiles_path, batch_size=128, field_delim=",", num_epochs=1, select_colums=["Var1","Var2","Var3","Var4"], label_name="Var4")
input_shape= (3,)
model=Sequential()
model.add(Dense)(1, input_shape= input_shape)
model.add(Dense)(5, activation='relu')
model.add(Dense)(1, activation='linear')
model.summary()
model.compile(....)
h= model.fit(dataset, epochs=5)