pytorch-beginner icon indicating copy to clipboard operation
pytorch-beginner copied to clipboard

Zero accuracy in 02 logistic regression

Open icemiliang opened this issue 6 years ago • 0 comments

In 02 Logistic Regression, all accuracies are zero. Need to convert torch tensor to float.

line 68: running_acc += num_correct.data[0] --> running_acc += num_correct.data[0].float() line 98: eval_acc += num_correct.data[0] --> eval_acc += num_correct.data[0].float()

icemiliang avatar Oct 22 '18 03:10 icemiliang