MCPcopy Create free account
hub / github.com/espnet/espnet / test_score

Function test_score

test/espnet2/cls/decoder/test_linear_decoder.py:26–30  ·  view source on GitHub ↗
(vocab_size, encoder_output_size, pooling, dropout)

Source from the content-addressed store, hash-verified

24@pytest.mark.parametrize("pooling", ["mean", "max", "CLS"])
25@pytest.mark.parametrize("dropout", [0.1, 0.0])
26def test_score(vocab_size, encoder_output_size, pooling, dropout):
27 decoder = LinearDecoder(vocab_size, encoder_output_size, pooling, dropout)
28 x = torch.randn(10, encoder_output_size)
29 score, _ = decoder.score(ys=None, state=None, x=x)
30 assert score.shape == (vocab_size,), score.shape
31
32
33@pytest.mark.execution_timeout(30)

Callers

nothing calls this directly

Calls 2

scoreMethod · 0.95
LinearDecoderClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…