pytorch/examples
Auf GitHub ansehenMNIST test_loader not being used as intended (wrong)!
Open
#756 geöffnet am 19. Apr. 2020
good first issue
Repository-Metriken
- Stars
- (21.634 Stars)
- PR-Merge-Metriken
- (Keine gemergten PRs in 30 T)
Beschreibung
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.