diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2022-03-17 20:10:42 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2022-03-17 20:10:42 +0800 |
commit | 9b2c25d3c927b7533e5d7d9665b67962e4c6934b (patch) | |
tree | b4a80004ffdfe8165f5f8d077afb8b054d4472ce /supervised/baseline.py | |
parent | 568569c764ffdd73cd660434df50d30d26203f63 (diff) |
Move some utils to libs directory
Diffstat (limited to 'supervised/baseline.py')
-rw-r--r-- | supervised/baseline.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/supervised/baseline.py b/supervised/baseline.py index 221b90d..15bb716 100644 --- a/supervised/baseline.py +++ b/supervised/baseline.py @@ -1,3 +1,9 @@ +import sys +from pathlib import Path + +path = str(Path(Path(__file__).parent.absolute()).parent.absolute()) +sys.path.insert(0, path) + import argparse import os import random @@ -11,11 +17,11 @@ from torch.utils.tensorboard import SummaryWriter from torchvision.datasets import CIFAR10, ImageNet from torchvision.transforms import transforms, InterpolationMode -from datautils import color_distortion, Clip, RandomGaussianBlur +from libs.datautils import color_distortion, Clip, RandomGaussianBlur +from libs.optimizers import LARS +from libs.schedulers import LinearWarmupAndCosineAnneal, LinearLR +from libs.utils import training_log, setup_logging, EPOCH_LOGGER, BATCH_LOGGER from models import CIFARResNet50, ImageNetResNet50 -from optimizers import LARS -from schedulers import LinearWarmupAndCosineAnneal, LinearLR -from utils import training_log, setup_logging, EPOCH_LOGGER, BATCH_LOGGER def build_parser(): |