Skip to content

Commit

Permalink
fix overlooked
Browse files Browse the repository at this point in the history
  • Loading branch information
i-aki-y committed Nov 2, 2023
1 parent 462b276 commit a79cea9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/torchmetrics/functional/classification/f_beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _fbeta_reduce(
) -> Tensor:
beta2 = beta**2
if average == "binary":
return _safe_divide((1 + beta2) * tp, (1 + beta2) * tp + beta2 * fn + fp)
return _safe_divide((1 + beta2) * tp, (1 + beta2) * tp + beta2 * fn + fp, zero_division)
if average == "micro":
tp = tp.sum(dim=0 if multidim_average == "global" else 1)
fn = fn.sum(dim=0 if multidim_average == "global" else 1)
Expand Down

0 comments on commit a79cea9

Please sign in to comment.