Model.fit_generator is obsolete. I have been trying tf.keras.Model() but that does not execute without errors. Model.fit does not work either when it comes to training models with generators
the following is the error message :
:4: UserWarning: Model.fit_generator is deprecated and will be removed in a future version. Please use Model.fit, which supports generators.
h = model.fit_generator(training_generator,
Epoch 1/100
ValueError Traceback (most recent call last)
in <cell line: 4>()
2 model_name = f'braai_{model.name}_{run_t_stamp}'
3
----> 4 h = model.fit_generator(training_generator,
5 steps_per_epoch=len(x_train) // batch_size,
6 validation_data=validation_generator,
2 frames
/usr/local/lib/python3.10/dist-packages/keras/src/engine/training.py in tf__train_function(iterator)
13 try:
14 do_return = True
---> 15 retval_ = ag__.converted_call(ag__.ld(step_function), (ag__.ld(self), ag__.ld(iterator)), None, fscope)
16 except:
17 do_return = False
ValueError: in user code:
Model.fit_generator is obsolete. I have been trying tf.keras.Model() but that does not execute without errors. Model.fit does not work either when it comes to training models with generators
the following is the error message :
:4: UserWarning:
Model.fit_generatoris deprecated and will be removed in a future version. Please useModel.fit, which supports generators.h = model.fit_generator(training_generator,
Epoch 1/100
ValueError Traceback (most recent call last)
in <cell line: 4>()
2 model_name = f'braai_{model.name}_{run_t_stamp}'
3
----> 4 h = model.fit_generator(training_generator,
5 steps_per_epoch=len(x_train) // batch_size,
6 validation_data=validation_generator,
2 frames
/usr/local/lib/python3.10/dist-packages/keras/src/engine/training.py in tf__train_function(iterator)
13 try:
14 do_return = True
---> 15 retval_ = ag__.converted_call(ag__.ld(step_function), (ag__.ld(self), ag__.ld(iterator)), None, fscope)
16 except:
17 do_return = False
ValueError: in user code: