Skip to content

Commit

Permalink
ADD: train with a single loss
Browse files Browse the repository at this point in the history
- a list of losses no longer needs to be specified

Signed-off-by: naweedkhan <[email protected]>
  • Loading branch information
NaweedAghmad committed Mar 1, 2023
1 parent ce66a9e commit 2382067
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lnn/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def loss_fn(self, losses):
f"expected losses from the following {[l.name for l in Loss]}"
)
elif isinstance(losses, Loss):
losses = [losses]
losses = {losses: None}
elif isinstance(losses, list):
losses = {c: None for c in losses}
result = list()
Expand Down

0 comments on commit 2382067

Please sign in to comment.