MCPcopy Create free account
hub / github.com/google-research/language / setup

Method setup

language/mentionmemory/modules/mlp.py:42–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected