Skip to content

Commit 1c5f5bc

Browse files
committed
small fix
1 parent a05641e commit 1c5f5bc

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
@@ -269,10 +269,10 @@ def _execute(
269269
model_output, labels, data.get("loss_kwargs", dict())
270270
)
271271
loss_kwargs = dict()
272-
loss_kwargs['weights'] = f.create_data_weights(batchsize=len(data['idents']),dim=data['labels'].size(dim=1),weights=data["loss_kwargs"],idents=data["idents"])
273272
if self.pass_loss_kwargs:
274273
loss_kwargs = loss_kwargs_candidates
275274
#torch.save(loss_data,"loss_data.pt")
275+
loss_kwargs['weights'] = f.create_data_weights(batchsize=len(data['idents']),dim=data['labels'].size(dim=1),weights=data["loss_kwargs"],idents=data["idents"])
276276
loss_kwargs["current_epoch"] = self.trainer.current_epoch
277277
loss = self.criterion(loss_data, loss_labels, **loss_kwargs)
278278
if isinstance(loss, tuple):

0 commit comments

Comments
 (0)