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

output shape inconsistent with comute_output_shape() #19261

Closed
AGFACBNNR opened this issue Mar 7, 2024 · 1 comment · Fixed by #19336
Closed

output shape inconsistent with comute_output_shape() #19261

AGFACBNNR opened this issue Mar 7, 2024 · 1 comment · Fixed by #19336
Assignees
Labels

Comments

@AGFACBNNR
Copy link

AGFACBNNR commented Mar 7, 2024

Maybe I found a bug in Keras 3.0.5.
The minimal code snippet triggering the bug is as following.

from keras.layers import UpSampling2D
import numpy as np
import keras

x = np.ones((1,2,3,4))
layer = UpSampling2D(data_format='channels_first',interpolation='bilinear')

print(layer(x).shape)
print(layer.compute_output_shape(x.shape))
print(keras.__version__)

The output is:

(1, 2, 8, 4)
(1, 2, 6, 8)
3.0.5

I believe they should be the same shape. Could you please have a look?

Copy link

Are you satisfied with the resolution of your issue?
Yes
No

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

Successfully merging a pull request may close this issue.

2 participants