Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model.fit_generator` is deprecated in braai_train.ipynb #9

Open
DRA-chaos opened this issue Oct 21, 2023 · 0 comments
Open

Model.fit_generator` is deprecated in braai_train.ipynb #9

DRA-chaos opened this issue Oct 21, 2023 · 0 comments

Comments

@DRA-chaos
Copy link

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant