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

Integrating Hyperparameters tuning into the keras.io example classification_with_grn_and vsn.py script #20769

Open
Humbulani1234 opened this issue Jan 16, 2025 · 0 comments
Assignees

Comments

@Humbulani1234
Copy link

Humbulani1234 commented Jan 16, 2025

I would have raised this under AutoKeras but it is in maintenance mode. Besides I think the issue is Keras/Tensorflow.

I have tried to incorporate hyperparameters tuning using Kerastuner and Autokeras for the script classification_with_grn_and_vsn.py and here is the new script with incorporated changes. Code changes are detailed in the comments sections.

The model builds, however I have been experiencing extremely slow training process due to tf.data.Dataset. The iterator is loading the data at an extremely slow rate, even crashing the program by exhausting memory. Surprisingly, this happens under the fit function and it works when being iterated from outside - on the main script. To assess whether the model does do run, I modified the backend Trainer class fit and evaluate functions - by removing the iterating line: for step, iterator in epoch_iterator. More code changes in the script.

It works after this minor modifications. But I would like to know as to why the iterator is operating at such a slow pace, exhausting memory and crashing the program, or may be its an issue of resources from my side.

Environment:

python == 3.11
keras == 3.8
Autokeras == 2.0
KeraTuner == 1.4
Tensorflow == 2.18
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

2 participants