Fix channels_first error in 3D Convolution Layers#1386
Fix channels_first error in 3D Convolution Layers#1386copybara-service[bot] merged 4 commits intotensorflow:mainfrom
channels_first error in 3D Convolution Layers#1386Conversation
channels_first error in 3D Convolution Layers
|
Is this something that can be reproduced in a test ( )? Technically we already test this layer w/ channels_first inside Sequential ( ).You can see how to run tests here: https://github.com/tensorflow/probability/blob/main/CONTRIBUTING.md#unit-tests |
|
@SiegeLordEx The test cases' input shape includes the batch size. Hence not reproducible. This error pops out when you try to define I've tested my changing also, it can also be found here. |
|
I'm asking for the reproduction to be checked into the tests. |
|
Yes, this can be reproduced in unit tests. Changing the following lines will reproduce: Please find the gist here. Edit: @SiegeLordEx If that was not what you've asked, can you be more specific? Thanks. |
|
@SiegeLordEx This was something can be reproduced in tests. Please see my comment above. The first commit should fix that error, second one is also for testing purposes. This was not reproducible in tests before since What will be the state of this PR? Is there anything should I do now? Thanks. |
|
Thanks for the fix! |
Related to the issue #1384. In 3D Convolutions if the data format is specified as
channels_firstit throws this error:TypeError: Failed to convert object of type <class 'list'> to Tensor. Contents: [None, 64, 1024, 32]. Consider casting elements to a supported type.Full traceback can be found on the related issue. This PR should fix that error.Please find the gist here.