MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / __init__

Method __init__

deepspeed/runtime/utils.py:955–960  ·  view source on GitHub ↗
(self, orig_layer, name="")

Source from the content-addressed store, hash-verified

953class TLinear(torch.nn.Linear):
954
955 def __init__(self, orig_layer, name=""):
956 self.name = name
957 super().__init__(orig_layer.weight.shape[1], orig_layer.weight.shape[0], bias=(orig_layer.bias is not None))
958 self.weight.data = transpose(orig_layer.weight.data)
959 self.bias = orig_layer.bias
960 self._fwd_func = self._fwd_bias_add if self.bias is not None else self._fwd
961
962 def _fwd(self, input):
963 return F.linear(input, self.weight)

Callers 1

__init__Method · 0.45

Calls 1

transposeFunction · 0.90

Tested by

no test coverage detected