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
Not sure if this is documented somewhere, but the column-major orientation seems to cause some confusion and is abused somehow.
One such example is that Flux follows the same convention from Pytorch and Tensorflow, calling it WHCN order, while almost the whole community uses permutedims(channelview(X), (2, 3, 1)) to convert the data. Yes, this is more friendly to memory layout than permutedims(..., (3, 2, 1)), but it is actually HWCN order. Even the Flux community isn't fully aware of this, e.g., JuliaML/MLDatasets.jl#34
We may also need to compare other image-processing libraries; by default, MATLAB to follow the same column-major order while numpy, on the other hand, takes row-major order.
Not sure if this is documented somewhere, but the column-major orientation seems to cause some confusion and is abused somehow.
One such example is that Flux follows the same convention from Pytorch and Tensorflow, calling it WHCN order, while almost the whole community uses
permutedims(channelview(X), (2, 3, 1))
to convert the data. Yes, this is more friendly to memory layout thanpermutedims(..., (3, 2, 1))
, but it is actually HWCN order. Even the Flux community isn't fully aware of this, e.g., JuliaML/MLDatasets.jl#34We may also need to compare other image-processing libraries; by default, MATLAB to follow the same column-major order while numpy, on the other hand, takes row-major order.
Thanks @pauljurczak for raising this issue in #142
The text was updated successfully, but these errors were encountered: