-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Error after upgrade from 3.6 to 3.7 #20686
Comments
Hi @ThorvaldAagaard, Thanks for reporting this issue. Within |
Hi @ThorvaldAagaard, I tried to replicate this issue and I am attaching two files where I ran the same model using both versions of Keras(3.6.0 and 3.7.0). Could you please provide more information about the model architecture you're using so that I can fully replicate the issue. Thanks! |
If just looking for model architecture this is what I used for training the model During my testing I found that training the model in 3.7 and predicting in 3.7 is fine But if you mix we have the problem. Based on the changes between 3.6 and 3.7 there should be no differences. So basically upgrading to 3.6 require retraining of models If you unzip the file below, and first try
and note the number of predictions - should be around 50 % In the zip-file there is the data (as numpy array) used for training, and the script to train the model Normally I will use 100 epochs, but just to verify there is a change 10 is fine. I have attached two models both trained on the same data one for keras 3.6 and one for keras 3.7 You can just switch the model name in test_lead_nn.py while switching keras version, and you will have the problem. (Split in two files due to github file size limit) |
I have a model, that use combined input.
Using version prior to 3.7 it works very fine, when using this to predict
Dropping the tf.function and using a normal predict also works fine
Output is typical something like this
Upgrading to keras 3.7, using the same model result in this output
Do you see the difference?
shape[0] for x and b is now None
But the real problem is the prediction, that is no longer correct
Just to be sure, I print the shape of x and b before clalling the tf.function
(1238, 42)
(1238, 15)
It looks like there is a problem finding the batch size for combined input, so for now I will have to stay at 3.6
The text was updated successfully, but these errors were encountered: