r""" Args: input: :math:`(*, C_{in})`, input tensor. Returns: :math:`(*, C_{out})`, output tensor.
(self, input: torch.Tensor)
| 83 | self.fixed_bias = fixed_bias |
| 84 | |
| 85 | def forward(self, input: torch.Tensor) -> torch.Tensor: |
| 86 | r""" |
| 87 | Args: |
| 88 | input: |
| 89 | :math:`(*, C_{in})`, input tensor. |
| 90 | |
| 91 | Returns: |
| 92 | :math:`(*, C_{out})`, output tensor. |
| 93 | """ |
| 94 | if self.bias is not None: |
| 95 | out = F.linear(input, self.weight * self.lr_multiplier, self.bias * self.lr_multiplier) |
| 96 | else: |
| 97 | out = F.linear(input, self.weight * self.lr_multiplier) |
| 98 | |
| 99 | if self.fixed_bias is not None: |
| 100 | out = out + self.fixed_bias |
| 101 | |
| 102 | return out |
| 103 | |
| 104 | |
| 105 | class StackedLinearLayers(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected