Skip to content

Commit

Permalink
no weight scaler
Browse files Browse the repository at this point in the history
  • Loading branch information
jkobject committed Jul 9, 2024
1 parent b343d2a commit 36c7b37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scdataloader/datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def setup(self, stage=None):
stage (str, optional): The stage of the model training process.
It can be either 'fit' or 'test'. Defaults to None.
"""
if len(self.clss_to_weight) > 0:
if len(self.clss_to_weight) > 0 and self.weight_scaler > 0:
weights, labels = self.dataset.get_label_weights(
self.clss_to_weight, scaler=self.weight_scaler
)
Expand Down

0 comments on commit 36c7b37

Please sign in to comment.