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

Method test_linear

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

Source from the content-addressed store, hash-verified

361 self.assertEqual(inputs.shape, outputs.shape)
362
363 def test_linear(self):
364 inputs = mx.zeros((10, 4))
365 layer = nn.Linear(input_dims=4, output_dims=8)
366 outputs = layer(inputs)
367 self.assertEqual(outputs.shape, (10, 8))
368
369 def test_bilinear(self):
370 inputs1 = mx.zeros((10, 2))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected