Skip to content

Commit 0cd149f

Browse files
yunjeysoumith
authored andcommitted
Add comments for default value (pytorch#2242)
1 parent 43c944a commit 0cd149f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

torch/nn/modules/batchnorm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class BatchNorm1d(_BatchNorm):
6767
momentum: the value used for the running_mean and running_var
6868
computation. Default: 0.1
6969
affine: a boolean value that when set to true, gives the layer learnable
70-
affine parameters.
70+
affine parameters. Default: True
7171
7272
Shape:
7373
- Input: :math:`(N, C)` or :math:`(N, C, L)`
@@ -114,7 +114,7 @@ class BatchNorm2d(_BatchNorm):
114114
momentum: the value used for the running_mean and running_var
115115
computation. Default: 0.1
116116
affine: a boolean value that when set to true, gives the layer learnable
117-
affine parameters.
117+
affine parameters. Default: True
118118
119119
Shape:
120120
- Input: :math:`(N, C, H, W)`
@@ -161,7 +161,7 @@ class BatchNorm3d(_BatchNorm):
161161
momentum: the value used for the running_mean and running_var
162162
computation. Default: 0.1
163163
affine: a boolean value that when set to true, gives the layer learnable
164-
affine parameters.
164+
affine parameters. Default: True
165165
166166
Shape:
167167
- Input: :math:`(N, C, D, H, W)`

torch/nn/modules/instancenorm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class InstanceNorm1d(_InstanceNorm):
5858
num_features: num_features from an expected input of size `batch_size x num_features x width`
5959
eps: a value added to the denominator for numerical stability. Default: 1e-5
6060
momentum: the value used for the running_mean and running_var computation. Default: 0.1
61-
affine: a boolean value that when set to true, gives the layer learnable affine parameters.
61+
affine: a boolean value that when set to true, gives the layer learnable affine parameters. Default: False
6262
6363
Shape:
6464
- Input: :math:`(N, C, L)`
@@ -102,7 +102,7 @@ class InstanceNorm2d(_InstanceNorm):
102102
num_features: num_features from an expected input of size batch_size x num_features x height x width
103103
eps: a value added to the denominator for numerical stability. Default: 1e-5
104104
momentum: the value used for the running_mean and running_var computation. Default: 0.1
105-
affine: a boolean value that when set to true, gives the layer learnable affine parameters.
105+
affine: a boolean value that when set to true, gives the layer learnable affine parameters. Default: False
106106
107107
Shape:
108108
- Input: :math:`(N, C, H, W)`
@@ -147,7 +147,7 @@ class InstanceNorm3d(_InstanceNorm):
147147
num_features: num_features from an expected input of size batch_size x num_features x depth x height x width
148148
eps: a value added to the denominator for numerical stability. Default: 1e-5
149149
momentum: the value used for the running_mean and running_var computation. Default: 0.1
150-
affine: a boolean value that when set to true, gives the layer learnable affine parameters.
150+
affine: a boolean value that when set to true, gives the layer learnable affine parameters. Default: False
151151
152152
Shape:
153153
- Input: :math:`(N, C, D, H, W)`

0 commit comments

Comments
 (0)