Skip to content
Snippets Groups Projects
Commit 39ed1c24 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[engine.trainer] Improve documentation

parent f722ca31
No related branches found
No related tags found
1 merge request!12Streamlining
......@@ -114,9 +114,10 @@ def do_train(
# progress bar only on interactive jobs
for samples in tqdm(
data_loader, desc="batches", leave=False, disable=None
data_loader, desc="batches", leave=False, disable=None,
):
# data forwarding on the existing network
images = samples[1].to(device)
ground_truths = samples[2].to(device)
masks = None
......@@ -125,6 +126,7 @@ def do_train(
outputs = model(images)
# loss evaluation and learning (backward step)
loss = criterion(outputs, ground_truths, masks)
optimizer.zero_grad()
loss.backward()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment