From 58bff6b69287abffc8df481ba6fb5fec9a072054 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 30 Sep 2021 23:06:54 +0200 Subject: Set leaky relu inplace to false --- text_recognizer/networks/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text_recognizer/networks/util.py b/text_recognizer/networks/util.py index c94e8dc..6cf102f 100644 --- a/text_recognizer/networks/util.py +++ b/text_recognizer/networks/util.py @@ -13,7 +13,7 @@ def activation_function(activation: str) -> Type[nn.Module]: ["elu", nn.ELU(inplace=True)], ["gelu", nn.GELU()], ["glu", nn.GLU()], - ["leaky_relu", nn.LeakyReLU(negative_slope=1.0e-2, inplace=True)], + ["leaky_relu", nn.LeakyReLU(negative_slope=1.0e-2, inplace=False)], ["none", nn.Identity()], ["relu", nn.ReLU(inplace=True)], ["selu", nn.SELU(inplace=True)], -- cgit v1.2.3-70-g09d2