def __assert_hcqt_slicer(dataset, t_len, *slicer_args):
    slicer = streams.hcqt_slices(dataset.to_df().iloc[0], t_len,
                                 *slicer_args, random_seed=RANDOM_SEED)
    for i in range(10):
        data = next(slicer)['x_in']
        assert len(data.shape) == 4
        assert data.shape[1] == 3
        assert data.shape[2] == t_len
Example #2
0
def __assert_hcqt_slicer(dataset, t_len, *slicer_args):
    slicer = streams.hcqt_slices(dataset.to_df().iloc[0],
                                 t_len,
                                 *slicer_args,
                                 random_seed=RANDOM_SEED)
    for i in range(10):
        data = next(slicer)['x_in']
        assert len(data.shape) == 4
        assert data.shape[1] == 3
        assert data.shape[2] == t_len
def __assert_hcqt_slicer_predict(dataset, t_len, *slicer_args):
    slicer = streams.hcqt_slices(dataset.to_df().iloc[0], t_len,
                                 *slicer_args, random_seed=RANDOM_SEED)
    # The first one should work
    data = next(slicer)['x_in']
    assert len(data.shape) == 4
    assert data.shape[1] == 3
    assert data.shape[2] == t_len

    # The second one should raise stopiteration
    with pytest.raises(StopIteration):
        data = next(slicer)['x_in']
Example #4
0
def __assert_hcqt_slicer_predict(dataset, t_len, *slicer_args):
    slicer = streams.hcqt_slices(dataset.to_df().iloc[0],
                                 t_len,
                                 *slicer_args,
                                 random_seed=RANDOM_SEED)
    # The first one should work
    data = next(slicer)['x_in']
    assert len(data.shape) == 4
    assert data.shape[1] == 3
    assert data.shape[2] == t_len

    # The second one should raise stopiteration
    with pytest.raises(StopIteration):
        data = next(slicer)['x_in']