From f61a64aab69f5fbec13738db6232e6ffdfeebedc Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Mon, 31 May 2021 20:46:45 +0800 Subject: [PATCH] Update arcmargin.py --- ppcls/arch/head/arcmargin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppcls/arch/head/arcmargin.py b/ppcls/arch/head/arcmargin.py index 4f27acbd..c7a79a1f 100644 --- a/ppcls/arch/head/arcmargin.py +++ b/ppcls/arch/head/arcmargin.py @@ -36,7 +36,7 @@ class ArcMargin(nn.Layer): input_norm = paddle.sqrt(paddle.sum(paddle.square(input), axis=1, keepdim=True)) input = paddle.divide(input, input_norm) - weight = self.fc0.weight + weight = self.fc.weight weight_norm = paddle.sqrt(paddle.sum(paddle.square(weight), axis=0, keepdim=True)) weight = paddle.divide(weight, weight_norm) -- GitLab