From 9beffbc7eb192491a8a6e4ec8d3f94a81b6bfba6 Mon Sep 17 00:00:00 2001 From: Dolly Ye <1375373964@qq.com> Date: Sat, 17 Feb 2018 22:52:07 -0800 Subject: [PATCH] x = torch.linspace(-5,5,200), size [200] y=torch.linspace(x1,x2) returns a one-dimensional tensor of size 100 equally spaced points between x1 and x2. y=torch.linspace(x1,x2,n) returns a one-dimensional tensor of n equally spaced points between x1 and x2. --- tutorial-contents-notebooks/203_activation.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial-contents-notebooks/203_activation.ipynb b/tutorial-contents-notebooks/203_activation.ipynb index 9d8c430..a53772b 100644 --- a/tutorial-contents-notebooks/203_activation.ipynb +++ b/tutorial-contents-notebooks/203_activation.ipynb @@ -41,7 +41,7 @@ "metadata": {}, "outputs": [], "source": [ - "x = torch.linspace(-5, 5, 200) # x data (tensor), shape=(100, 1)\n", + "x = torch.linspace(-5, 5, 200) # x data (tensor), shape=(200, 1)\n", "x = Variable(x)\n", "x_np = x.data.numpy() # numpy array for plotting" ]