MCPcopy Create free account
hub / github.com/AI-Hypercomputer/maxtext / init

Method init

src/MaxText/layers/models.py:60–64  ·  view source on GitHub ↗

Initializes the model.

(self, *args, model_mode: str = MODEL_MODE_TRAIN, **kwargs)

Source from the content-addressed store, hash-verified

58 # pylint: enable=attribute-defined-outside-init
59
60 def init(self, *args, model_mode: str = MODEL_MODE_TRAIN, **kwargs):
61 """Initializes the model."""
62 module = self.clone(model_mode=model_mode)
63 kwargs["model_mode"] = model_mode
64 return nn.Module.init(module, *args, **kwargs)
65
66 def apply(self, *args, model_mode: str = MODEL_MODE_TRAIN, **kwargs):
67 """Applies the model."""

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected