File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ def forward(self, x):
178
178
print ('[%d, %5d] loss: %.3f' %
179
179
(epoch + 1 , i + 1 , running_loss / 2000 ))
180
180
running_loss = 0.0
181
+ break
181
182
182
183
print ('Finished Training' )
183
184
@@ -230,6 +231,7 @@ def forward(self, x):
230
231
_ , predicted = torch .max (outputs .data , 1 )
231
232
total += labels .size (0 )
232
233
correct += (predicted == labels ).sum ().item ()
234
+ break
233
235
234
236
print ('Accuracy of the network on the 10000 test images: %d %%' % (
235
237
100 * correct / total ))
@@ -254,6 +256,7 @@ def forward(self, x):
254
256
label = labels [i ]
255
257
class_correct [label ] += c [i ].item ()
256
258
class_total [label ] += 1
259
+ break
257
260
258
261
259
262
for i in range (10 ):
@@ -336,4 +339,6 @@ def forward(self, x):
336
339
337
340
# %%%%%%INVISIBLE_CODE_BLOCK%%%%%%
338
341
del dataiter
342
+ del trainloader
343
+ del testloader
339
344
# %%%%%%INVISIBLE_CODE_BLOCK%%%%%%
You can’t perform that action at this time.
0 commit comments