Skip to content

Commit

Permalink
4 is batchSize at line 901
Browse files Browse the repository at this point in the history
  • Loading branch information
haipinglu committed Dec 9, 2020
1 parent 583c111 commit 8017fcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lab 7 - Neural Networks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@
" outputs = loadCNN(images)\n",
" _, predicted = torch.max(outputs, 1)\n",
" c = (predicted == labels).squeeze()\n",
" for i in range(4):\n",
" for i in range(batchSize):\n",
" label = labels[i]\n",
" class_correct[label] += c[i].item()\n",
" class_total[label] += 1\n",
Expand Down

0 comments on commit 8017fcc

Please sign in to comment.