MCPcopy Create free account
hub / github.com/deepbrainai-research/float / forward

Method forward

models/float/encoder.py:125–133  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

123 self.lr_mul = lr_mul
124
125 def forward(self, input):
126
127 if self.activation:
128 out = F.linear(input, self.weight * self.scale)
129 out = fused_leaky_relu(out, self.bias * self.lr_mul)
130 else:
131 out = F.linear(input, self.weight * self.scale, bias=self.bias * self.lr_mul)
132
133 return out
134
135 def __repr__(self):
136 return (f'{self.__class__.__name__}({self.weight.shape[1]}, {self.weight.shape[0]})')

Callers

nothing calls this directly

Calls 1

fused_leaky_reluFunction · 0.70

Tested by

no test coverage detected