Skip to content

Commit

Permalink
fix import when transforms.v2 not available
Browse files Browse the repository at this point in the history
  • Loading branch information
liopeer committed Nov 12, 2024
1 parent edd1755 commit 2e89959
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lightly/transforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# Copyright (c) 2020. Lightly AG and its affiliates.
# All Rights Reserved

from lightly.transforms.add_grid_transform import AddGridTransform
from lightly.transforms.aim_transform import AIMTransform
from lightly.transforms.amplitude_rescale_transform import AmplitudeRescaleTranform
from lightly.transforms.byol_transform import (
Expand Down Expand Up @@ -55,3 +54,7 @@
from lightly.transforms.vicreg_transform import VICRegTransform, VICRegViewTransform
from lightly.transforms.vicregl_transform import VICRegLTransform, VICRegLViewTransform
from lightly.transforms.wmse_transform import WMSETransform
from lightly.utils.dependency import torchvision_transforms_v2_available

if torchvision_transforms_v2_available():
from lightly.transforms.add_grid_transform import AddGridTransform

0 comments on commit 2e89959

Please sign in to comment.