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

Conv3D crash when the data_format is 'channels_first' and using Tensorflow backend #19591

Closed
AGFACBNNR opened this issue Apr 23, 2024 · 4 comments · Fixed by #19641
Closed

Conv3D crash when the data_format is 'channels_first' and using Tensorflow backend #19591

AGFACBNNR opened this issue Apr 23, 2024 · 4 comments · Fixed by #19641
Assignees
Labels
layers stat:awaiting keras-eng Awaiting response from Keras engineer type:Bug

Comments

@AGFACBNNR
Copy link

AGFACBNNR commented Apr 23, 2024

According to the document of Conv3D in keras website, Conv3D should accept inputs with data format 'channels_first' or 'channels_last'.
While in this colab, I got the following results.
image

@AGFACBNNR AGFACBNNR changed the title Conv3D crash when Conv3D crash when the data_format is 'channels_first' and using Tensorflow backend Apr 23, 2024
@fchollet
Copy link
Member

According to the error message, the lack of support is only on CPU -- GPU should work fine. There's no CPU kernel for channels_first Conv3D. We can't fix that on the Keras side except by doing a transpose/counter-transpose in that case, which would be very inefficient.

@AGFACBNNR
Copy link
Author

Got it. I'll try it on GPU.

@AGFACBNNR AGFACBNNR reopened this Apr 24, 2024
@AGFACBNNR
Copy link
Author

AGFACBNNR commented Apr 24, 2024

@fchollet
Sorry for bothering again.
Surprisingly, I found that sometimes Conv3D can get an output when data_format is 'channels_first'.
In this colab, l1 and l2 have the same parameters, except for 'groups'. However, l1 can generate an output while l2 meets an error, as shown in the following. This is very strange. I thought 'groups' would not influence the data format of inputs.
image

@sachinprasadhs sachinprasadhs added keras-team-review-pending Pending review by a Keras team member. type:Bug layers labels Apr 24, 2024
@haifeng-jin haifeng-jin self-assigned this Apr 25, 2024
@sachinprasadhs sachinprasadhs added stat:awaiting keras-eng Awaiting response from Keras engineer and removed keras-team-review-pending Pending review by a Keras team member. labels Apr 25, 2024
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
layers stat:awaiting keras-eng Awaiting response from Keras engineer type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants