-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
31 lines (29 loc) · 853 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from re import T
from sklearn.covariance import fast_mcd
import torch
import albumentations as A
from albumentations.pytorch import ToTensorV2
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
TRAIN_DIR = "datasets/horse2zebra"
TEST_DIR = "datasets/horse2zebra"
BATCH_SIZE = 1
LEARNING_RATE = 2e-4
LAMBDA_INDENTITY = 0
LAMBDA_CYCLE = 10
NUM_WORKERS = 4
NUM_EPOCHS = 100
LOAD_MODEL = False
SAVE_MODEL = True
CHECKPOINT_GEN_H = "genz_checkpoint.pth"
CHECKPOINT_GEN_Z = "genh_checkpoint.pth"
CHECKPOINT_CRITIC_H = "criticz_checkpoint.pth"
CHECKPOINT_CRITIC_Z = "critich_checkpoint.pth"
transforms = A.Compose(
[
A.Resize(height=256, width=256),
A.HorizontalFlip(p=0.5),
A.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5],max_pixel_value=255),
ToTensorV2(),
],
additional_targets={"image0": "image"},
)