From af0b70c013be4baab0bd6b199f0854107aa24513 Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Thu, 14 Jul 2022 22:31:20 +0800 Subject: Fix a path problem --- libs/__init__.py | 0 simclr/main.py | 3 +-- 2 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 libs/__init__.py diff --git a/libs/__init__.py b/libs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/simclr/main.py b/simclr/main.py index 0252e3a..0f93716 100644 --- a/simclr/main.py +++ b/simclr/main.py @@ -11,11 +11,10 @@ from torch.utils.data import Dataset from torchvision.datasets import CIFAR10, CIFAR100, ImageNet from torchvision.transforms import transforms -from libs.criteria import InfoNCELoss - path = str(Path(Path(__file__).parent.absolute()).parent.absolute()) sys.path.insert(0, path) +from libs.criteria import InfoNCELoss from libs.datautils import color_distortion, Clip, RandomGaussianBlur, TwinTransform from libs.optimizers import LARS from libs.schedulers import LinearWarmupAndCosineAnneal, LinearLR -- cgit v1.2.3