DeblurGANv2
DeblurGANv2 copied to clipboard
Train slowly under window
I ran the code under W7 GeForce RTX 2080 Ti, and met problem.I modified the code as below follow https://github.com/TAMU-VITA/DeblurGANv2/issues/29, But i find it train too slow. Does anybody know how to implove it? Thanks a lot!
train.py def _run_epoch(self, epoch): #tq = tqdm.tqdm(self.train_dataset, total=epoch_size) tq = tqdm.tqdm(self.train_dataset.dataset, total=epoch_size)
models.py def get_input(self, data): img = data['a'] inputs = img img = data['b'] targets = img #inputs, targets = inputs.cuda(), targets.cuda() return self.array_to_batch(inputs), self.array_to_batch(targets)
def array_to_batch(self, x): #x = np.transpose(x, (2, 0, 1)) x = np.expand_dims(x, 0) return torch.from_numpy(x).cuda()
CUDA on windows is known to be slower than that on linux, what's your gpu utility rate?