diff --git a/configs/efficientnet_v2/metafile.yml b/configs/efficientnet_v2/metafile.yml index 6c927dce99a..97d6d79120f 100644 --- a/configs/efficientnet_v2/metafile.yml +++ b/configs/efficientnet_v2/metafile.yml @@ -17,7 +17,7 @@ Collections: Title: "EfficientNetV2: Smaller Models and Faster Training" README: configs/efficientnet_v2/README.md Code: - URL: https://github.com/open-mmlab/mmpretrain/blob/main/mmpretrain/models/backbones/beit.py + URL: https://github.com/open-mmlab/mmpretrain/blob/main/mmpretrain/models/backbones/efficientnet_v2.py Version: v1.0.0rc4 Models: diff --git a/mmpretrain/datasets/transforms/processing.py b/mmpretrain/datasets/transforms/processing.py index 4c640f6b1fa..c54f2569fb1 100644 --- a/mmpretrain/datasets/transforms/processing.py +++ b/mmpretrain/datasets/transforms/processing.py @@ -82,10 +82,9 @@ def register_vision_transforms() -> List[str]: _transform = getattr(torchvision.transforms, module_name) if inspect.isclass(_transform) and callable( _transform) and not isinstance(_transform, (EnumMeta)): - from functools import partial TRANSFORMS.register_module( - module=partial( - TorchVisonTransformWrapper, transform=_transform), + module=lambda name=module_name: TorchVisonTransformWrapper( + transform=torchvision.transforms[name], name=name), name=f'torchvision/{module_name}') vision_transforms.append(f'torchvision/{module_name}') return vision_transforms