Skip to content

Commit ebf9bfd

Browse files
committed
update for torch 0.3
1 parent f65e27f commit ebf9bfd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tutorial-contents/302_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def forward(self, x):
5959
if t % 2 == 0:
6060
# plot and show learning process
6161
plt.cla()
62-
prediction = torch.max(F.softmax(out), 1)[1]
62+
prediction = torch.max(out, 1)[1]
6363
pred_y = prediction.data.numpy().squeeze()
6464
target_y = y.data.numpy()
6565
plt.scatter(x.data.numpy()[:, 0], x.data.numpy()[:, 1], c=pred_y, s=100, lw=0, cmap='RdYlGn')

0 commit comments

Comments
 (0)