-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add gallery example for MixUp and CutMix #7772
Conversation
""" | ||
|
||
# %% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using # %%
instead of the long #####...
as in the other examples allows for those scripts to be properly interpreted as notebook within vscode / pycharm. It makes writing / debugging those examples a lot easier. I'm tempted to align the other scripts to use this syntax as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sure, but please in a follow-up PR.
docs/Makefile
Outdated
@@ -6,7 +6,7 @@ ifneq ($(EXAMPLES_PATTERN),) | |||
endif | |||
|
|||
# You can set these variables from the command line. | |||
SPHINXOPTS = -W -j auto $(EXAMPLES_PATTERN_OPTS) | |||
SPHINXOPTS = -j auto $(EXAMPLES_PATTERN_OPTS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will put back before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget.
""" | ||
|
||
# %% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sure, but please in a follow-up PR.
class Mixup(_BaseMixupCutmix): | ||
"""[BETA] Apply Mixup to the provided batch of images and labels. | ||
"""[BETA] Apply MixUp to the provided batch of images and labels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we than also rename the classes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought about it, went for consistency with timm (i.e. Cutmix
). No strong opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind either, but I want both our documentation and class name to be the same. Your choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥲 #7731 (comment) I'm going to let you guys decide what to do as I want to avoid re-undo stuff.
(I don't think we absolutely have to align docs and code: CutMix is the technic, Cutmix is the class object - it's OK to have a distinction.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vfdev-5 Could you clarify if you meant to only switch to MixUp
/ CutMix
for the documentation or for the classes as well? I prefer to have both the same, but don't care whether it is Cutmix
or CutMix
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Nicolas!
class Mixup(_BaseMixupCutmix): | ||
"""[BETA] Apply Mixup to the provided batch of images and labels. | ||
"""[BETA] Apply MixUp to the provided batch of images and labels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vfdev-5 Could you clarify if you meant to only switch to MixUp
/ CutMix
for the documentation or for the classes as well? I prefer to have both the same, but don't care whether it is Cutmix
or CutMix
.
docs/Makefile
Outdated
@@ -6,7 +6,7 @@ ifneq ($(EXAMPLES_PATTERN),) | |||
endif | |||
|
|||
# You can set these variables from the command line. | |||
SPHINXOPTS = -W -j auto $(EXAMPLES_PATTERN_OPTS) | |||
SPHINXOPTS = -j auto $(EXAMPLES_PATTERN_OPTS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget.
Merged, will address whatever we decide on #7772 later |
Reviewed By: matteobettini Differential Revision: D48642291 fbshipit-source-id: edecd2575c086cf66e7f2c4b9f6edb3db262ee2d
Closes #7766