From a6551f7dba4b672e50eee05f9231dc907b19cda3 Mon Sep 17 00:00:00 2001 From: Anwai Archit <52396323+anwai98@users.noreply.github.com> Date: Thu, 15 Feb 2024 00:20:49 +0100 Subject: [PATCH] Update dice.py --- 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}