Skip to content

Commit

Permalink
Fix performance issue with sample weights
Browse files Browse the repository at this point in the history
  • Loading branch information
dnerini committed Mar 31, 2023
1 parent b3f8f0c commit 1b8ea15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlpp_lib/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def train(
res = model.fit(
x=datamodule.train.x,
y=datamodule.train.y,
sample_weight=datamodule.train.w,
sample_weight=(datamodule.train.w,) if datamodule.train.w is not None else None,
epochs=cfg.get("epochs", 1),
validation_data=(datamodule.val.x, datamodule.val.y),
callbacks=callbacks,
Expand Down

0 comments on commit 1b8ea15

Please sign in to comment.