Skip to content

Commit 9beffbc

Browse files
author
Dolly Ye
authored
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.
1 parent 0b09c05 commit 9beffbc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tutorial-contents-notebooks/203_activation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"metadata": {},
4242
"outputs": [],
4343
"source": [
44-
"x = torch.linspace(-5, 5, 200) # x data (tensor), shape=(100, 1)\n",
44+
"x = torch.linspace(-5, 5, 200) # x data (tensor), shape=(200, 1)\n",
4545
"x = Variable(x)\n",
4646
"x_np = x.data.numpy() # numpy array for plotting"
4747
]

0 commit comments

Comments
 (0)