Skip to content

Commit f851333

Browse files
committed
added directory creation
1 parent b412493 commit f851333

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import numpy as np
66
from torchvision.utils import save_image
77
import time
8-
8+
import os
99

1010
BATCH_SIZE = 32
1111
N_EPOCHS = 100
@@ -21,6 +21,10 @@
2121

2222
DEVICE = torch.device('cuda') # torch.device('cpu')
2323

24+
for dir_ in ["models", "samples"]:
25+
if not os.path.exists(dir_):
26+
os.mkdir(dir_)
27+
2428
preproc_transform = transforms.Compose([
2529
transforms.ToTensor(),
2630
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))

0 commit comments

Comments
 (0)