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
While trying to move from Keras 2 to Keras 3 with PyTorch, I ran into a problem in my model where a Conv2D layer outputs a shape wider in one dimension and shorter in another. It behaves appropriately when using the Tensorflow backend.
Thanks for reporting the issue. Here for torch backend running on keras3 for comparing output shape need to change kernel_size and stride like this conv2d = Conv2D(output_size, kernel_size=(4,4),strides=(2, 2),padding='same',activation='relu', kernel_initializer='ones',use_bias=False).
And also input_2d need to transpose to feed input to conv2d inputs_2d = inputs_2d.transpose(1,2,3,0)
While trying to move from Keras 2 to Keras 3 with PyTorch, I ran into a problem in my model where a Conv2D layer outputs a shape wider in one dimension and shorter in another. It behaves appropriately when using the Tensorflow backend.
A reproducing gist is here.
The text was updated successfully, but these errors were encountered: