[NFC] polish colossalai/nn/layer/parallel_3d/layers.py code style (#966)

pull/997/head
LuGY 2022-05-16 10:18:49 +08:00 committed by binmakeswell
parent 955463e542
commit fb5bc6cb28
1 changed files with 3 additions and 3 deletions

View File

@ -53,8 +53,8 @@ class LayerNorm3D(ParallelLayer):
self.weight = Parameter( self.weight = Parameter(
torch.ones(self.normalized_shape_per_partition, device=get_current_device(), dtype=dtype)) torch.ones(self.normalized_shape_per_partition, device=get_current_device(), dtype=dtype))
if bias: if bias:
self.bias = Parameter(torch.zeros(self.normalized_shape_per_partition, self.bias = Parameter(
device=get_current_device(), dtype=dtype)) torch.zeros(self.normalized_shape_per_partition, device=get_current_device(), dtype=dtype))
else: else:
self.bias = None self.bias = None
self.variance_epsilon = eps self.variance_epsilon = eps