-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
33 lines (25 loc) · 692 Bytes
/
Copy pathconfig.py
File metadata and controls
33 lines (25 loc) · 692 Bytes
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
32
33
import os
import torch
trainFolder = os.path.join("data", "train")
testFolder = os.path.join("data", "test")
# folder paths
epochs = 250
batchSize = 8
lr = 2e-4
betas = (0.5, 0.999)
l1Lambda = 100
# training config
device = "cuda" if torch.cuda.is_available() else "cpu"
# device
numWorkers = 8
# number of workers to load data in dataloader
checkpointDirectory = "checkpoints"
genCheckPointTemplate = "gen-{t}.pth"
discCheckPointTemplate = "disc-{t}.pth"
checkPointEvery = 5
outputDirectory = "outputs"
# checkpoint configuration
if not os.path.exists(checkpointDirectory):
os.mkdir(checkpointDirectory)
if not os.path.exists(outputDirectory):
os.mkdir(outputDirectory)