update
This commit is contained in:
@ -63,7 +63,7 @@ for t in range(100):
|
||||
pred_y = prediction.data.numpy().squeeze()
|
||||
target_y = y.data.numpy()
|
||||
plt.scatter(x.data.numpy()[:, 0], x.data.numpy()[:, 1], c=pred_y, s=100, lw=0, cmap='RdYlGn')
|
||||
accuracy = sum(pred_y == target_y)/200
|
||||
accuracy = sum(pred_y == target_y)/200.
|
||||
plt.text(1.5, -4, 'Accuracy=%.2f' % accuracy, fontdict={'size': 20, 'color': 'red'})
|
||||
plt.pause(0.1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user