Skip to content
Snippets Groups Projects
Commit 28a261b0 authored by Daniel CARRON's avatar Daniel CARRON :b:
Browse files

[model] Fix detection of binary targets in loss balancing

parent 88dd9259
No related branches found
No related tags found
1 merge request!38Replace sampler balancing by loss balancing
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment