You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting the issue. Both issues are reproduce in all backend(jax,tensorflow and torch).
Issue1: Getting the error ValueError: Computed output size would be negative. Received: inputs.shape=[1 4 4 1]andpool_size=[2 3]``
Here AveragePooling2D layer `data_format="channels_first".`
So for input= [1,4,4,1] here, batch_size=1, channel= 4, height= 4, width=1
For padding='valid' : (W−F+2P)/S+1:
(1-2+2 x 0)/1+1= -1
(1-3+2 x 0)/1+1= -2
So changing padding='same' in AveragePooling2D layer will resolve the error.
Issue2: Getting the error: TypeError: can only concatenate list (not "tuple") to list
change layer.compute_output_shape([1, 1]) to layer.compute_output_shape((1, 1)) will resolve the error.
Thanks for you reply!
The input is indeed wrong, but that's not my point. I thought it is unreasonable that the dynamic has a result, but the static inference shape reports an error. If the results are the same( both report error or both have a result ), it would be more user friendly.
In some cases, the dynamic has a result, but the static inference shape reports an error.
Here are some samples:
version: keras -- 3.5.0; Jax – 0.4.31
This is what I got for the static result:
and the dynamic result:
version: keras -- 3.5.0; Jax – 0.4.31
The problem also occurs when backend is Torch.
3.
version: keras-- 3.5.0; Torch -- 2.4.0
The text was updated successfully, but these errors were encountered: