From 4d7a5544f7f8596e1cdf4a72b08a5fb26070efbf Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Fri, 10 Dec 2021 14:01:09 -0800 Subject: [PATCH] Remove inplace sigmoid for consistency with other impl --- timm/models/layers/evo_norm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timm/models/layers/evo_norm.py b/timm/models/layers/evo_norm.py index d89aa424..f48d9a83 100644 --- a/timm/models/layers/evo_norm.py +++ b/timm/models/layers/evo_norm.py @@ -248,7 +248,7 @@ class EvoNorm2dS0a(EvoNorm2dS0): d = group_std(x, self.groups, self.eps) if self.v is not None: v = self.v.view(v_shape).to(dtype=x_dtype) - x = x * (x * v).sigmoid_() + x = x * (x * v).sigmoid() x = x / d return x * self.weight.view(v_shape).to(dtype=x_dtype) + self.bias.view(v_shape).to(dtype=x_dtype)