Xsmos commited on
Commit
a5a7d74
·
verified ·
1 Parent(s): bc62665
Files changed (2) hide show
  1. diffusion.py +1 -1
  2. load_h5.py +1 -1
diffusion.py CHANGED
@@ -427,7 +427,7 @@ class DDPM21CM:
427
  pbar_train = tqdm(total=len(self.dataloader), disable=not self.accelerator.is_local_main_process)
428
  pbar_train.set_description(f"device {torch.cuda.current_device()}, Epoch {ep}")
429
  for i, (x, c) in enumerate(self.dataloader):
430
- print(f"device {torch.cuda.current_device()}, x[:,0,:2,:2,:2] =", x[:,0,:2,:2,:2])
431
  with self.accelerator.accumulate(self.nn_model):
432
  x = x.to(self.config.device)
433
  xt, noise, ts = self.ddpm.add_noise(x)
 
427
  pbar_train = tqdm(total=len(self.dataloader), disable=not self.accelerator.is_local_main_process)
428
  pbar_train.set_description(f"device {torch.cuda.current_device()}, Epoch {ep}")
429
  for i, (x, c) in enumerate(self.dataloader):
430
+ print(f"device {torch.cuda.current_device()}, x[:10,0,:2,:2,:2] =", x[:10,0,:2,:2,:2])
431
  with self.accelerator.accumulate(self.nn_model):
432
  x = x.to(self.config.device)
433
  xt, noise, ts = self.ddpm.add_noise(x)
load_h5.py CHANGED
@@ -102,7 +102,7 @@ class Dataset4h5(Dataset):
102
  self.images = torch.ones_like(torch.from_numpy(self.images)) * torch.arange(len(self.images))[:,None,None,None,None]
103
  self.images = self.images.numpy()
104
  # print("after self.images.shape =", self.images.shape)
105
- # print(self.images[:6,0,:2,:2,:2])
106
  # self.images = self.images.numpy()
107
 
108
  # plt.imshow(self.images[0,0,0])
 
102
  self.images = torch.ones_like(torch.from_numpy(self.images)) * torch.arange(len(self.images))[:,None,None,None,None]
103
  self.images = self.images.numpy()
104
  # print("after self.images.shape =", self.images.shape)
105
+ print(self.images[:6,0,:2,0,0])
106
  # self.images = self.images.numpy()
107
 
108
  # plt.imshow(self.images[0,0,0])