Skip to content

Commit 395b5a8

Browse files
committed
only add current_epoch if pass_loss_kwargs flag is set
1 parent f909c4a commit 395b5a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chebai/models/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def _execute(
278278
loss_kwargs = dict()
279279
if self.pass_loss_kwargs:
280280
loss_kwargs = loss_kwargs_candidates
281-
loss_kwargs["current_epoch"] = self.trainer.current_epoch
281+
loss_kwargs["current_epoch"] = self.trainer.current_epoch
282282
loss = self.criterion(loss_data, loss_labels, **loss_kwargs)
283283
if isinstance(loss, tuple):
284284
unnamed_loss_index = 1

0 commit comments

Comments
 (0)