From 38033ab8c3bdf8588b0928e8e495f3418ad8ab19 Mon Sep 17 00:00:00 2001 From: yh_cc Date: Wed, 15 May 2019 00:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E9=80=9A?= =?UTF-8?q?=E8=BF=87test=5Futils.py=E7=9A=84=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/core/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/test_utils.py b/test/core/test_utils.py index 6d70d97c..91b5d00f 100644 --- a/test/core/test_utils.py +++ b/test/core/test_utils.py @@ -76,7 +76,7 @@ class TestMoveModelDeivce(unittest.TestCase): if torch.cuda.is_available(): device = [0] _model = _move_model_to_device(model, device) - assert isinstance(_model, nn.DataParallel) + assert not isinstance(_model, nn.DataParallel) device = [torch.device('cuda:0'), torch.device('cuda:0')] with self.assertRaises(Exception): _model = _move_model_to_device(model, device)