add prototype AugMix transform#5492
Conversation
💊 CI failures summary and remediationsAs of commit 3a455d8 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
datumbox
left a comment
There was a problem hiding this comment.
Thanks for the changes. Overall it looks good but I've added question on a few spots:
Conflicts: torchvision/prototype/transforms/_auto_augment.py torchvision/prototype/transforms/_utils.py
| def _put_into_sample(sample: Any, id: Tuple[Any, ...], item: Any) -> Any: | ||
| if not id: | ||
| return item | ||
|
|
||
| parent = sample | ||
| for key in id[:-1]: | ||
| parent = parent[key] | ||
|
|
||
| parent[id[-1]] = item | ||
| return sample |
There was a problem hiding this comment.
Should we put it on ._utils?
There was a problem hiding this comment.
It probably should be in torchvision.utils._internal since it will be needed in torchvision.prototype.datasets. Given that we currently only need it here, I would leave it to #5422 to do this properly and remove the definition here.
datumbox
left a comment
There was a problem hiding this comment.
Looks good, only minor comments:
| def _put_into_sample(sample: Any, id: Tuple[Any, ...], item: Any) -> Any: | ||
| if not id: | ||
| return item | ||
|
|
||
| parent = sample | ||
| for key in id[:-1]: | ||
| parent = parent[key] | ||
|
|
||
| parent[id[-1]] = item | ||
| return sample |
There was a problem hiding this comment.
Should we put it on ._utils?
Summary: * add prototype AugMix transform * cleanup * refactor auto augment subclasses to only trnasform a single image * address review comments Reviewed By: datumbox Differential Revision: D34579510 fbshipit-source-id: b483642885913f844ffd72ef449de5a82467fc78
#5411 for prototype transforms.