MCPcopy Create free account
hub / github.com/ml-explore/mlx / __init__

Method __init__

python/tests/test_nn.py:78–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

76 def test_model_with_dict(self):
77 class DictModule(nn.Module):
78 def __init__(self):
79 super().__init__()
80 self.weights = {"w1": mx.zeros((2, 2)), "w2": mx.ones((2, 2))}
81
82 model = DictModule()
83 params = tree_flatten(model.parameters(), destination={})

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected