Update BatchNorm1d

Change default value of affine in BatchNorm1d to be True.
This commit is contained in:
Zheng-Ning Liu 2020-11-25 13:30:21 +08:00 committed by GitHub
parent 08d6f8e607
commit 798018880e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -371,7 +371,7 @@ class BatchNorm(Module):
return norm_x * w + b
class BatchNorm1d(Module):
def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=None, is_train=True, sync=True):
def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=True, is_train=True, sync=True):
self.sync = sync
self.num_features = num_features
self.is_train = is_train