Skip to content

Commit

Permalink
set BendingEnergyLoss default normalize to False
Browse files Browse the repository at this point in the history
Maybe it's more important that the default behavior match usage of the
term "bending energy" elsewhere, rather than that it be the most
convenient behavior.

Signed-off-by: Ebrahim Ebrahim <ebrahim.ebrahim@kitware.com>
  • Loading branch information
ebrahimebrahim committed Dec 15, 2021
1 parent 79de4e1 commit bb2366f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monai/losses/deform.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ class BendingEnergyLoss(_Loss):
DeepReg (https://github.com/DeepRegNet/DeepReg)
"""

def __init__(self, normalize: bool = True, reduction: Union[LossReduction, str] = LossReduction.MEAN) -> None:
def __init__(self, normalize: bool = False, reduction: Union[LossReduction, str] = LossReduction.MEAN) -> None:
"""
Args:
normalize:
Whether to divide out spatial sizes in order to make the computation roughly
invariant to image scale (i.e. vector field sampling resolution). Defaults to True.
invariant to image scale (i.e. vector field sampling resolution). Defaults to False.
reduction: {``"none"``, ``"mean"``, ``"sum"``}
Specifies the reduction to apply to the output. Defaults to ``"mean"``.
Expand Down

0 comments on commit bb2366f

Please sign in to comment.