(self)
| 40 | bias_init: InitType = default_values.bias_init |
| 41 | |
| 42 | def setup(self): |
| 43 | self.mlp = nn.Dense( |
| 44 | features=self.hidden_dim, |
| 45 | kernel_init=self.kernel_init, |
| 46 | bias_init=self.bias_init) |
| 47 | self.dense = nn.Dense( |
| 48 | features=self.input_dim, |
| 49 | kernel_init=self.kernel_init, |
| 50 | bias_init=self.bias_init) |
| 51 | self.dropout = nn.Dropout(self.dropout_rate) |
| 52 | self.layer_norm = nn.LayerNorm(epsilon=self.layer_norm_epsilon) |
| 53 | |
| 54 | def __call__(self, x: Array, deterministic: bool) -> Array: |
| 55 | """Applies MLP block update. |
nothing calls this directly
no outgoing calls
no test coverage detected