Skip to content

Commit 1da218f

Browse files
committedAug 27, 2024
utils
1 parent f52347e commit 1da218f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎utils_a.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ def show_random_images(dataset, mean, std, classes, target_label=None):
243243
plt.show()
244244

245245

246+
246247
def train(dataloader, model, optimizer, criterion, device, epoch, num_epochs):
247248
print(f"Training started.")
248249
print(f"Epoch {epoch + 1}/{num_epochs}")
@@ -266,7 +267,6 @@ def train(dataloader, model, optimizer, criterion, device, epoch, num_epochs):
266267
print(f"Training completed, loss: {final_loss:.4f}")
267268
return final_loss
268269

269-
270270
def test(model, device, dataloader, name):
271271
print(f'Testing started on {name}.')
272272
model.to(device)

0 commit comments

Comments
 (0)
Please sign in to comment.