yunjey / pytorch-tutorial

PyTorch Tutorial for Deep Learning Researchers
MIT License
29.54k stars 8k forks source link

<Fixed a bug in accuracy calculation> #221

Open htlee6 opened 3 years ago

htlee6 commented 3 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>