Does flax/jax care about image channel order? #3501
Answered
by
chiamp
davidshen84
asked this question in
Q&A
-
|
Hi, Most ML libraries prefer images to be pre-processed to be channel first. But I could not find a reference about how flax/jax prefer it. Does flax take care of it automatically? (I don't think it is possible) |
Beta Was this translation helpful? Give feedback.
Answered by
chiamp
Nov 28, 2023
Replies: 3 comments 4 replies
-
|
For the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
chiamp
-
|
Thanks.
I noticed the underlying implementation uses
https://jax.readthedocs.io/en/latest/_autosummary/jax.lax.conv_general_dilated.html,
which defaults channel-first. Is there any reason we changed the convention
in flax?
…On Wed, 29 Nov 2023 at 06:57, Marcus Chiam ***@***.***> wrote:
For the Conv layer, it's *channels-last* convention, see:
https://flax.readthedocs.io/en/latest/api_reference/flax.linen/_autosummary/flax.linen.Conv.html#flax.linen.Conv.__call
__
—
Reply to this email directly, view it on GitHub
<#3501 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQBTOHIAC3GN725HWLKX3YGY6ZRAVCNFSM6AAAAAA7W42RTOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMOJWGY2DE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the
Convlayer, it's channels-last convention