From f5f5b0b9dafc215d0ba6385660a5b9902bab8934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=89=E5=AE=8F=E6=A2=85?= <591861959@qq.com> Date: Thu, 7 Apr 2022 09:33:51 +0000 Subject: [PATCH] update --- .../image_classification/CycleGAN_ID0521_for_PyTorch/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PyTorch/dev/cv/image_classification/CycleGAN_ID0521_for_PyTorch/train.py b/PyTorch/dev/cv/image_classification/CycleGAN_ID0521_for_PyTorch/train.py index 0539810524..ad942495bb 100644 --- a/PyTorch/dev/cv/image_classification/CycleGAN_ID0521_for_PyTorch/train.py +++ b/PyTorch/dev/cv/image_classification/CycleGAN_ID0521_for_PyTorch/train.py @@ -227,8 +227,8 @@ for epoch in range(0, args.epochs): break start_time = time.time() # get batch size data - real_image_A = data["A"].to(device) - real_image_B = data["B"].to(device) + real_image_A = data["A"].to(device,non_blocking=True) + real_image_B = data["B"].to(device,non_blocking=True) batch_size = real_image_A.size(0) # real data label is 1, fake data label is 0. -- Gitee