From fd8fb8fd5c0e830da292fe3e4f248836d3962c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=89=E5=AE=8F=E6=A2=85?= <591861959@qq.com> Date: Mon, 21 Mar 2022 02:03:07 +0000 Subject: [PATCH] update --- .../cv/classification/Vgg16_ID1630_for_PyTorch/vgg.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PyTorch/contrib/cv/classification/Vgg16_ID1630_for_PyTorch/vgg.py b/PyTorch/contrib/cv/classification/Vgg16_ID1630_for_PyTorch/vgg.py index b28b64969f..68be33f88a 100644 --- a/PyTorch/contrib/cv/classification/Vgg16_ID1630_for_PyTorch/vgg.py +++ b/PyTorch/contrib/cv/classification/Vgg16_ID1630_for_PyTorch/vgg.py @@ -55,13 +55,15 @@ class VGG(nn.Module): x = self.fc1(x) x = self.relu(x) if self.training: - x = x.cpu() - x = self.drop(x).npu() + # x = x.cpu() + # x = self.drop(x).npu() + x = self.drop(x) x = self.fc2(x) x = self.relu(x) if self.training: - x = x.cpu() - x = self.drop(x).npu() + # x = x.cpu() + # x = self.drop(x).npu() + x = self.drop(x) x = self.fc3(x) return x -- Gitee