Skip to content
Snippets Groups Projects

Replace sampler balancing by loss balancing

Merged Daniel CARRON requested to merge loss-balancing into main
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -162,7 +162,7 @@ def get_positive_weights(
targets_tensor = torch.tensor(targets_list)
if len(list(targets_tensor.shape)) == 1:
if targets_tensor.shape[0] == 1:
logger.info("Computing positive weights assuming binary labels.")
positive_weights = compute_binary_weights(targets_tensor)
else:
Loading