From b1a91028c3abb79d946f4c449261261cc4747dbd Mon Sep 17 00:00:00 2001 From: Anwai Archit <52396323+anwai98@users.noreply.github.com> Date: Mon, 4 Mar 2024 20:57:00 +0100 Subject: [PATCH] Update dice.py (#220) --- torch_em/loss/dice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/torch_em/loss/dice.py b/torch_em/loss/dice.py index b7fd27ed..da0d147f 100644 --- a/torch_em/loss/dice.py +++ b/torch_em/loss/dice.py @@ -89,6 +89,7 @@ def __init__(self, channelwise=True, eps=1e-7, reduce_channel="sum"): super().__init__() self.channelwise = channelwise self.eps = eps + self.reduce_channel = reduce_channel # all torch_em classes should store init kwargs to easily recreate the init call self.init_kwargs = {"channelwise": channelwise, "eps": self.eps, "reduce_channel": self.reduce_channel}