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

Method setup

language/mentionmemory/modules/mlm_layer.py:39–51  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

37 layer_norm_epsilon: float
38
39 def setup(self):
40 self.dense = nn.Dense(
41 features=self.hidden_size,
42 dtype=self.dtype,
43 )
44 self.layer_norm = nn.LayerNorm(self.layer_norm_epsilon)
45 self.embedding_dense = nn.Dense(
46 features=self.vocab_size,
47 use_bias=False,
48 dtype=self.dtype,
49 kernel_init=self.embedding_init,
50 )
51 self.bias = self.param('bias', self.bias_init, (self.vocab_size,))
52
53 def __call__(
54 self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected