From 158cf74642665d8a87e8fcecf9cc3f8d1fbbaaea Mon Sep 17 00:00:00 2001 From: guarin <43336610+guarin@users.noreply.github.com> Date: Fri, 22 Mar 2024 14:46:07 +0100 Subject: [PATCH] Add timm version info to docs (#1517) * Add minimum timm version info to docs * Update MAE transform import in docs --- docs/source/examples/mae.rst | 8 ++++++++ docs/source/getting_started/install.rst | 2 +- examples/pytorch/mae.py | 2 +- examples/pytorch_lightning/mae.py | 2 +- examples/pytorch_lightning_distributed/mae.py | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/source/examples/mae.rst b/docs/source/examples/mae.rst index eae27ed7e..73d53875c 100644 --- a/docs/source/examples/mae.rst +++ b/docs/source/examples/mae.rst @@ -15,6 +15,14 @@ input image and using a shallow decoder architecture. Reference: `Masked Autoencoders Are Scalable Vision Learners, 2021 `_ +.. note:: + + MAE requires `TIMM `_ to be + installed + + .. code-block:: bash + + pip install "timm>=0.9.9" .. tabs:: .. tab:: PyTorch diff --git a/docs/source/getting_started/install.rst b/docs/source/getting_started/install.rst index c7cc71e71..6572313da 100644 --- a/docs/source/getting_started/install.rst +++ b/docs/source/getting_started/install.rst @@ -37,7 +37,7 @@ If you want to work use the Masked Autoencoder you need to additionally install .. code-block:: bash - pip install timm + pip install "timm>=0.9.9" Next Steps ------------ diff --git a/examples/pytorch/mae.py b/examples/pytorch/mae.py index 1f22ae8ec..2fffacfb9 100644 --- a/examples/pytorch/mae.py +++ b/examples/pytorch/mae.py @@ -8,7 +8,7 @@ from lightly.models import utils from lightly.models.modules import MAEDecoderTIMM, MaskedVisionTransformerTIMM -from lightly.transforms.mae_transform import MAETransform +from lightly.transforms import MAETransform class MAE(nn.Module): diff --git a/examples/pytorch_lightning/mae.py b/examples/pytorch_lightning/mae.py index 832ebab17..3c29ae487 100644 --- a/examples/pytorch_lightning/mae.py +++ b/examples/pytorch_lightning/mae.py @@ -9,7 +9,7 @@ from lightly.models import utils from lightly.models.modules import MAEDecoderTIMM, MaskedVisionTransformerTIMM -from lightly.transforms.mae_transform import MAETransform +from lightly.transforms import MAETransform class MAE(pl.LightningModule): diff --git a/examples/pytorch_lightning_distributed/mae.py b/examples/pytorch_lightning_distributed/mae.py index e3b6ccfec..d4414d210 100644 --- a/examples/pytorch_lightning_distributed/mae.py +++ b/examples/pytorch_lightning_distributed/mae.py @@ -9,7 +9,7 @@ from lightly.models import utils from lightly.models.modules import MAEDecoderTIMM, MaskedVisionTransformerTIMM -from lightly.transforms.mae_transform import MAETransform +from lightly.transforms import MAETransform class MAE(pl.LightningModule):