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

Make ImageToTensor compatible with Flux's WHC format #90

Merged
merged 4 commits into from
Mar 20, 2024

Conversation

adrhill
Copy link
Collaborator

@adrhill adrhill commented Mar 18, 2024

As discussed in #89 (comment), this PR modifies ImageToTensor to return WHC arrays instead of HWC by default, making it out-of-the box compatible with Flux and Metalhead.jl.

@darsnack's previous suggestion was:

For now, why don't we throw a deprecation warning in ImageToTensor with instructions how to get HWC in the future using (fixed) ImageToTensor + PermuteDims?

However, a release including this PR could be considered breaking since it might break users' existing data preprocessing pipelines.


Related issues:

@adrhill adrhill requested a review from darsnack March 18, 2024 19:36
@CarloLucibello
Copy link
Member

Can you update the version in Project.toml to 0.3?

@adrhill
Copy link
Collaborator Author

adrhill commented Mar 19, 2024

I also took the liberty of updating the outdated CHANGELOG.

@CarloLucibello CarloLucibello merged commit 38e4be5 into FluxML:master Mar 20, 2024
6 checks passed
@adrhill adrhill deleted the ah/whc branch March 20, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants