Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
Fix LossAndLog error when there is no loss. (#75) (#79)
Browse files Browse the repository at this point in the history
Thanks! Fix seems good. CI is failing, same stuff that happened on Treeo.
  • Loading branch information
jiyuuchc authored Feb 26, 2023
1 parent 551f768 commit a63a5a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion treex/metrics/loss_and_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def compute(self) -> tp.Tuple[jnp.ndarray, Logs, Logs]:
if self.losses is not None:
loss, losses_logs = self.losses.compute()
else:
loss = jnp.zeros(0.0, dtype=jnp.float32)
loss = jnp.array(0.0, dtype=jnp.float32)
losses_logs = {}

if self.metrics is not None:
Expand Down

0 comments on commit a63a5a9

Please sign in to comment.