From e2df09eab38ab8ed402c0dcb2cf32c2504ae7403 Mon Sep 17 00:00:00 2001 From: wuxingpeng Date: Fri, 8 Apr 2022 01:48:31 +0000 Subject: [PATCH] =?UTF-8?q?update=20=E3=80=90PyTorch=E3=80=91=E3=80=90dev?= =?UTF-8?q?=E3=80=91=E3=80=90FixMatch=5FID0989=5Ffor=5FPyTorch=E3=80=91?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A8=A1=E7=B3=8A=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../image_classification/FixMatch_ID0989_for_PyTorch/train.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PyTorch/dev/cv/image_classification/FixMatch_ID0989_for_PyTorch/train.py b/PyTorch/dev/cv/image_classification/FixMatch_ID0989_for_PyTorch/train.py index 3f8baad87a..d6804a7484 100644 --- a/PyTorch/dev/cv/image_classification/FixMatch_ID0989_for_PyTorch/train.py +++ b/PyTorch/dev/cv/image_classification/FixMatch_ID0989_for_PyTorch/train.py @@ -57,7 +57,7 @@ import apex logger = logging.getLogger(__name__) best_acc = 0 - +torch.npu.set_start_fuzz_compile_step(3) def save_checkpoint(state, is_best, checkpoint, filename='checkpoint.pth.tar'): filepath = os.path.join(checkpoint, filename) torch.save(state, filepath) @@ -365,6 +365,7 @@ def train(args, labeled_trainloader, unlabeled_trainloader, test_loader, p_bar = tqdm(range(args.eval_step), disable=args.local_rank not in [-1, 0]) for batch_idx in range(args.eval_step): + torch.npu.global_step_inc() try: inputs_x, targets_x = labeled_iter.next() except: -- Gitee