keras-team / keras-tuner

A Hyperparameter Tuning Library for Keras
https://keras.io/keras_tuner/
Apache License 2.0
2.86k stars 396 forks source link

Keras Tuner crashing #1011

Open Iphykay opened 5 months ago

Iphykay commented 5 months ago

Describe the bug I don't know why this happens but it does the first trial and then shows the error on the 2nd and 3rd trials. I don't know why it says the shape is changing. The input shape is not changing. This happens when it does the tuner.search() image_2024-06-15_124746007

To Reproduce When you run the colab file, it runs well and sometimes it produces that error even when the input same is not changing. Unfortunately, I can't share my data, but i reproduced something close to it https://colab.research.google.com/drive/1RkpAoA-bunT0muFLYAtkKdM6F3WPp1YS?usp=sharing

Expected behavior No crash!

Additional context Tensorflow version: version 2.16.1 Keras version: 3.1.1 Keras-Tuner version: 1.4.7

Would you like to help us fix it? I don't know to be honest.

Iphykay commented 5 months ago

I found out what the issue was. I was down-sampling the data to the point the kernel can't do the convolution on the data. 3 layers is enough to prevent that error. Number of layers will depend on the grid size of the image.

ghsanti commented 2 months ago

You are correct! I think it can be closed @Iphykay.

Iphykay commented 2 months ago

Yeah sure thing.