0715-1441
Browse files- diffusion.py +4 -4
diffusion.py
CHANGED
|
@@ -238,8 +238,8 @@ class TrainConfig:
|
|
| 238 |
dim = 3
|
| 239 |
stride = (2,2) if dim == 2 else (2,2,4)
|
| 240 |
num_image = 1000#32000#20000#15000#7000#25600#3000#10000#1000#10000#5000#2560#800#2560
|
| 241 |
-
batch_size = 2#50#20#2#100 # 10
|
| 242 |
-
n_epoch =
|
| 243 |
HII_DIM = 64
|
| 244 |
num_redshift = 512#128#64#512#256#256#64#512#128
|
| 245 |
channel = 1
|
|
@@ -266,7 +266,7 @@ class TrainConfig:
|
|
| 266 |
# seed = 0
|
| 267 |
# save_dir = './outputs/'
|
| 268 |
|
| 269 |
-
save_period = np.infty#.1 # the period of sampling
|
| 270 |
# general parameters for the name and logger
|
| 271 |
# device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 272 |
lrate = 1e-4
|
|
@@ -576,7 +576,7 @@ def train(rank, world_size):
|
|
| 576 |
|
| 577 |
ddp_setup(rank, world_size)
|
| 578 |
|
| 579 |
-
num_image_list = [
|
| 580 |
for i, num_image in enumerate(num_image_list):
|
| 581 |
config.num_image = num_image
|
| 582 |
# config.world_size = world_size
|
|
|
|
| 238 |
dim = 3
|
| 239 |
stride = (2,2) if dim == 2 else (2,2,4)
|
| 240 |
num_image = 1000#32000#20000#15000#7000#25600#3000#10000#1000#10000#5000#2560#800#2560
|
| 241 |
+
batch_size = 1#2#50#20#2#100 # 10
|
| 242 |
+
n_epoch = 4# 10#50#20#20#2#5#25 # 120
|
| 243 |
HII_DIM = 64
|
| 244 |
num_redshift = 512#128#64#512#256#256#64#512#128
|
| 245 |
channel = 1
|
|
|
|
| 266 |
# seed = 0
|
| 267 |
# save_dir = './outputs/'
|
| 268 |
|
| 269 |
+
save_period = 1#np.infty#.1 # the period of sampling
|
| 270 |
# general parameters for the name and logger
|
| 271 |
# device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 272 |
lrate = 1e-4
|
|
|
|
| 576 |
|
| 577 |
ddp_setup(rank, world_size)
|
| 578 |
|
| 579 |
+
num_image_list = [2000]#[200]#[1600,3200,6400,12800,25600]
|
| 580 |
for i, num_image in enumerate(num_image_list):
|
| 581 |
config.num_image = num_image
|
| 582 |
# config.world_size = world_size
|