Open jiqiujia opened 5 years ago
@shionhonda How do u print the accuracy for every few global steps, and finally create that curve?
@zheolong
The loss and accuracy is exactly what is printed on console by data_iter
in pretrain.py
.
Insert the following code here and plot it.
with open(FILENAME, 'a') as f:
f.write('%d,%f,%f\n' %(i, avg_loss/(i+1), total_correct/total_element*100))
oh my god ! I have no idea about this. I have the same result with avg_acc =50, according these methods in the issue.
I try to run the code on a small dataset and I find that pred_loss decrease fast while avg_acc stay at 50%. It is strange to me since decrease in pred_loss should indicates increase in accuracy.![image](https://user-images.githubusercontent.com/8109984/47352288-2e2b0f80-d6ec-11e8-96c0-2187e18d651c.png)