Skip to content

Commit

Permalink
feat #70: small fixes to train lib
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioQuijanoRey committed May 15, 2024
1 parent 7778108 commit 6648ec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/trainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ def train_model_online(
path: dir where models are going to be saved
parameters: dict having the following data:
- "lr": learning rate
- "momentum": momentum of the optimizer
- "criterion": loss function
- "epochs": epochs to train
train_loader: pytorch DataLoader wrapping training set
Expand Down Expand Up @@ -238,6 +237,7 @@ def train_model_online(
# Backward + Optimize
# Clip the gradient if that is specified
# Gradient Clipping is performed after backward and before step
print(f"TODO -- {loss=}")
loss.backward()

if gradient_clipping is not None:
Expand Down

0 comments on commit 6648ec4

Please sign in to comment.