Simple linear layer with weight initialization.
(rows, columns, init_method)
| 45 | |
| 46 | |
| 47 | def get_linear_layer(rows, columns, init_method): |
| 48 | """Simple linear layer with weight initialization.""" |
| 49 | layer = torch.nn.Linear(rows, columns) |
| 50 | init_method(layer.weight) |
| 51 | with torch.no_grad(): |
| 52 | layer.bias.zero_() |
| 53 | return layer |
| 54 | |
| 55 | |
| 56 | def fast_gelu(x): |
nothing calls this directly
no outgoing calls
no test coverage detected