pytorch/examples

MNIST test_loader not being used as intended (wrong)!

オープン

#756 opened on 2020/04/19

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)Python (9,429 件のフォーク)batch import
good first issue

Repository metrics

Stars
 (21,634 個のスター)
PR merge metrics
 (PR metrics pending)

説明

In the MNIST code, around line 57 (I think), the following code is wrong in my opinion for data, target in test_loader: It should be replaced by for idx,(data, target) in test_loader: The original code gives an error (int has no attribute .to(device)) as originally, data is actually assigned an integer (idx value) wrongly. I have verified this fix works. The code for training is correct but surprisingly there is a mistake in test code.

コントリビューターガイド