yunjey / pytorch-tutorial

PyTorch Tutorial for Deep Learning Researchers
MIT License
30.36k stars 8.14k forks source link

<Fixed a bug in accuracy calculation> #221

Open htlee6 opened 4 years ago

htlee6 commented 4 years ago

<The variable correct is a tensor object, which may lead to a RuntimeError when divided by an int. Using the method .item() solves this problem. Fix #220>