MCPcopy Create free account
hub / github.com/kyegomez/BitNet / test_bitlinear_zero_input

Function test_bitlinear_zero_input

tests/tests.py:85–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83
84
85def test_bitlinear_zero_input():
86 layer = BitLinear(10, 20)
87 input_tensor = torch.zeros(5, 10)
88 output = layer(input_tensor)
89 assert torch.allclose(output, torch.zeros(5, 20), atol=1e-2)
90
91
92def test_bitlinear_weight_sign():

Callers

nothing calls this directly

Calls 1

BitLinearClass · 0.90

Tested by

no test coverage detected