mirror of https://github.com/hpcaitech/ColossalAI
update code format
parent
666cfd094a
commit
46c9ba33da
|
@ -302,10 +302,8 @@ class Linear1D_Col(ParallelLayer):
|
||||||
with seed(ParallelMode.TENSOR):
|
with seed(ParallelMode.TENSOR):
|
||||||
self.reset_parameters(weight_initializer, bias_initializer)
|
self.reset_parameters(weight_initializer, bias_initializer)
|
||||||
self._set_tensor_parallel_attributes()
|
self._set_tensor_parallel_attributes()
|
||||||
if self.gather_output:
|
is_parallel_output = not self.gather_output
|
||||||
set_parallel_input(False)
|
set_parallel_input(is_parallel_output)
|
||||||
else:
|
|
||||||
set_parallel_input(True)
|
|
||||||
|
|
||||||
def reset_parameters(self, weight_initializer, bias_initializer) -> None:
|
def reset_parameters(self, weight_initializer, bias_initializer) -> None:
|
||||||
fan_in, fan_out = self.in_features, self.out_features
|
fan_in, fan_out = self.in_features, self.out_features
|
||||||
|
|
Loading…
Reference in New Issue