Skip to content

Resolve issue #267#283

Merged
seba-1511 merged 7 commits intolearnables:masterfrom
nightlessbaron:master
Jan 21, 2022
Merged

Resolve issue #267#283
seba-1511 merged 7 commits intolearnables:masterfrom
nightlessbaron:master

Conversation

@nightlessbaron
Copy link
Copy Markdown
Contributor

@nightlessbaron nightlessbaron commented Nov 10, 2021

Description

Fixes #267

As discussed with @seba-1511, adds an option for RGB bands for Random Rotation.

Contribution Checklist

If your contribution modifies code in the core library (not docs, tests, or examples), please fill the following checklist.

  • My contribution is listed in CHANGELOG.md with attribution.
  • My contribution modifies code in the main library.
  • My modifications are tested.
  • My modifications are documented.

@nightlessbaron
Copy link
Copy Markdown
Contributor Author

One more thing that can be added is a try-catch for the older version of torchvision.
It seems that the tests are failing for the same reason. Let me know if I should add it @seba-1511

@seba-1511
Copy link
Copy Markdown
Member

seba-1511 commented Nov 10, 2021

Thanks for this PR @nightlessbaron!

Yes, catching the exception for older versions is a good idea. Some more comments from a quick glance at the code:

  • I think you can remove Compose around the random rotation (but you'll need it for older versions when converting to and from PIL).
  • The tests you included already look great. Could we also have a few small unit tests that don't require a dataset (you can pass a 4-dim random tensor instead of real images)?

Let me know when it's ready for a full review, and thanks again.

@nightlessbaron
Copy link
Copy Markdown
Contributor Author

@seba-1511, thanks for your review. I have incorporated the changes you suggested.
Can you have a final check again? Thank you!

@seba-1511
Copy link
Copy Markdown
Member

@nightlessbaron, this looks great and looks ready to merge -- thanks for persisting! Do you want to add a line to CHANGELOG.md and credit yourself?

@nightlessbaron
Copy link
Copy Markdown
Contributor Author

Thanks, @seba-1511, it's done.

@seba-1511 seba-1511 merged commit e06f682 into learnables:master Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ValueError: The number of elements in 'fill' does not match the number of bands of the image (1 != 3)

2 participants