From 771b589d0cd3a540be68a9501bf9fe07fb2bf841 Mon Sep 17 00:00:00 2001 From: Moqim <104286151+Moqim-Flourite@users.noreply.github.com> Date: Tue, 7 Mar 2023 16:38:35 +0800 Subject: [PATCH] Update weight_norm_hook.py (#51178) add comment. --- python/paddle/nn/utils/weight_norm_hook.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/nn/utils/weight_norm_hook.py b/python/paddle/nn/utils/weight_norm_hook.py index ae797a3f2be..e3fa2872387 100644 --- a/python/paddle/nn/utils/weight_norm_hook.py +++ b/python/paddle/nn/utils/weight_norm_hook.py @@ -232,6 +232,7 @@ def remove_weight_norm(layer, name='weight'): # Conv2D(3, 5, kernel_size=[3, 3], data_format=NCHW) remove_weight_norm(conv) + # The following is the effect after removing the weight norm: # print(conv.weight_g) # AttributeError: 'Conv2D' object has no attribute 'weight_g' """ -- GitLab