Exemple #1
0
def test_save_and_load_tasnet(fb):
    model1 = LSTMTasNet(n_src=2, hid_size=4, n_layers=1, n_filters=32, dropout=0.0, fb_name=fb,)
    test_input = torch.randn(1, 800)
    model_conf = model1.serialize()

    reconstructed_model = LSTMTasNet.from_pretrained(model_conf)
    assert_allclose(model1(test_input), reconstructed_model(test_input))
Exemple #2
0
def test_save_and_load_tasnet(fb):
    _default_test_model(
        LSTMTasNet(
            n_src=2,
            hid_size=4,
            n_layers=1,
            n_filters=32,
            dropout=0.0,
            fb_name=fb,
        ))