(context_residual, rnn_type)
| 20 | @pytest.mark.parametrize("context_residual", [True, False]) |
| 21 | @pytest.mark.parametrize("rnn_type", ["lstm", "gru"]) |
| 22 | def test_RNNDecoder_init_state(context_residual, rnn_type): |
| 23 | decoder = RNNDecoder(10, 12, context_residual=context_residual, rnn_type=rnn_type) |
| 24 | x = torch.randn(9, 12) |
| 25 | state = decoder.init_state(x) |
| 26 | t = torch.randint(0, 10, [4], dtype=torch.long) |
| 27 | decoder.score(t, state, x) |
| 28 | |
| 29 | |
| 30 | def test_RNNDecoder_invalid_type(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…