MCPcopy Create free account
hub / github.com/apple/axlearn / test_prepend_axis

Method test_prepend_axis

axlearn/common/param_init_test.py:329–338  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

327
328 # pytype: disable=attribute-error
329 def test_prepend_axis(self):
330 initial = FanAxes(in_axis=0, out_axis=1, batch_axis=-1)
331 self.assertEqual(
332 initial.prepend_axis(axis_type=FanAxes.AxisType.OUT_AXIS),
333 FanAxes(in_axis=1, out_axis=(0, 2), batch_axis=-1),
334 )
335 self.assertEqual(
336 initial.prepend_axis(axis_type=FanAxes.AxisType.NONE),
337 FanAxes(in_axis=1, out_axis=2, batch_axis=-1),
338 )
339
340 def test_append_axis(self):
341 initial = FanAxes(in_axis=-1, out_axis=-2, batch_axis=0)

Callers

nothing calls this directly

Calls 2

prepend_axisMethod · 0.95
FanAxesClass · 0.90

Tested by

no test coverage detected