You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python/paddle/nn/layer/norm.py
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1752,7 +1752,7 @@ class SpectralNorm(Layer):
1752
1752
1753
1753
Step 1:
1754
1754
Generate vector U in shape of [H], and V in shape of [W].
1755
-
While H is the :attr:`axis` th dimension of the input weights,
1755
+
While H is the :attr:`dim` th dimension of the input weights,
1756
1756
and W is the product result of remaining dimensions.
1757
1757
1758
1758
Step 2:
@@ -1779,9 +1779,9 @@ class SpectralNorm(Layer):
1779
1779
1780
1780
Parameters:
1781
1781
weight_shape(list or tuple): The shape of weight parameter.
1782
-
axis(int, optional): The index of dimension which should be permuted to the first before reshaping Input(Weight) to matrix, it should be set as 0 if Input(Weight) is the weight of fc layer, and should be set as 1 if Input(Weight) is the weight of conv layer. Default: 0.
1782
+
dim(int, optional): The index of dimension which should be permuted to the first before reshaping Input(Weight) to matrix, it should be set as 0 if Input(Weight) is the weight of fc layer, and should be set as 1 if Input(Weight) is the weight of conv layer. Default: 0.
1783
1783
power_iters(int, optional): The number of power iterations to calculate spectral norm. Default: 1.
1784
-
epsilon(float, optional): The epsilon for numerical stability in calculating norms. Default: 1e-12.
1784
+
eps(float, optional): The epsilon for numerical stability in calculating norms. Default: 1e-12.
1785
1785
name (str, optional): The default value is None. Normally there is no need for user to set this property. For more information, please refer to :ref:`api_guide_Name` .
1786
1786
dtype (str, optional): Data type, it can be "float32" or "float64". Default: "float32".
0 commit comments