From 840a9b5dedb76696471e5b9de423481207478596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BC=8A=E5=8F=A3=E8=B5=B5?= <2540685662@qq.com> Date: Fri, 1 Feb 2019 15:25:13 +0800 Subject: [PATCH] =?UTF-8?q?Update=20chapter2:=20PyTorch=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=85=A5=E9=97=A8.ipynb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 小试牛刀中需要引入torch,否则后面的代码报错 import torch as t --- ...yTorch\345\277\253\351\200\237\345\205\245\351\227\250.ipynb" | 1 + 1 file changed, 1 insertion(+) diff --git "a/chapter2-\345\277\253\351\200\237\345\205\245\351\227\250/chapter2: PyTorch\345\277\253\351\200\237\345\205\245\351\227\250.ipynb" "b/chapter2-\345\277\253\351\200\237\345\205\245\351\227\250/chapter2: PyTorch\345\277\253\351\200\237\345\205\245\351\227\250.ipynb" index 19ffce43..47fbc1bc 100644 --- "a/chapter2-\345\277\253\351\200\237\345\205\245\351\227\250/chapter2: PyTorch\345\277\253\351\200\237\345\205\245\351\227\250.ipynb" +++ "b/chapter2-\345\277\253\351\200\237\345\205\245\351\227\250/chapter2: PyTorch\345\277\253\351\200\237\345\205\245\351\227\250.ipynb" @@ -1203,6 +1203,7 @@ "outputs": [], "source": [ "import torchvision as tv\n", + "import torch as t\n", "import torchvision.transforms as transforms\n", "from torchvision.transforms import ToPILImage\n", "show = ToPILImage() # 可以把Tensor转成Image,方便可视化"