From 9260babdec1dbaa037101c4c314077ff6fd1e999 Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Thu, 9 Nov 2023 20:10:53 +0800 Subject: [PATCH] Update pytorch_example.py --- 2023.11.08_pytorch_example/pytorch_example.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/2023.11.08_pytorch_example/pytorch_example.py b/2023.11.08_pytorch_example/pytorch_example.py index 9f3873a..bab5e10 100644 --- a/2023.11.08_pytorch_example/pytorch_example.py +++ b/2023.11.08_pytorch_example/pytorch_example.py @@ -24,8 +24,7 @@ print('\n\n') print(int_tensor) print(float_tensor) print(double_tensor) - - +print('张量在 CPU 或 GPU :', int_tensor.device) # Torch数据和NumPy数据的转换