I am getting an error when trying to do multi-classification with three classes.
Error: TypeError: fit_generator() got multiple values for argument 'steps_per_epoch'
Code Giving Error:
NN.fit_generator(train_set, train_labels,steps_per_epoch=(train_samples/ batch_size),epochs=epochs,validation_data=(validation_set, validation_labels),validation_steps=(validation_samples / batch_size))
Full Code: https://pastebin.com/V1YwJW3X
I would GREATLY appreciate any help with the issue, as I am at a total loss. Thank you!
The Keras documentation provides the following definition for fit_generator
:
fit_generator(self, generator, steps_per_epoch=None, epochs=1, verbose=1, callbacks=None, validation_data=None, validation_steps=None, class_weight=None, max_queue_size=10, workers=1, use_multiprocessing=False, shuffle=True, initial_epoch=0)
You have provided two positional arguments:
train_set
- this got assigned to generator
train_labels
- this got assigned to steps_per_epoch
But then you provide another (now keyword argument) steps_per_epoch
, hence the error.