We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e21e82 commit 744c9ffCopy full SHA for 744c9ff
pytorchTUT/302_classification.py
@@ -17,7 +17,7 @@
17
n_data = torch.ones(100, 2)
18
x0 = torch.normal(2*n_data, 1) # class0 x data (tensor), shape=(100, 2)
19
y0 = torch.zeros(100) # class0 y data (tensor), shape=(100, 1)
20
-x1 = torch.normal(-2*n_data, 1) # class1 x data (tensor), shape=(100, 1)
+x1 = torch.normal(-2*n_data, 1) # class1 x data (tensor), shape=(100, 2)
21
y1 = torch.ones(100) # class1 y data (tensor), shape=(100, 1)
22
x = torch.cat((x0, x1), 0).type(torch.FloatTensor) # FloatTensor = 32-bit floating
23
y = torch.cat((y0, y1), ).type(torch.LongTensor) # LongTensor = 64-bit integer
0 commit comments