@pytest.mark.parametrize('Model, layers, target', [
    (theanets.convolution.Regressor, REG_LAYERS, u.NUM_OUTPUTS),
    (theanets.convolution.Classifier, CLF_LAYERS, u.NUM_CLASSES),
])
def test_predict(Model, layers, target):
    outs = Model(layers).feed_forward(u.CNN.INPUTS)
    assert len(list(outs)) == 8
    W, H = u.CNN.NUM_WIDTH, u.CNN.NUM_HEIGHT
    w, h = u.CNN.FILTER_WIDTH, u.CNN.FILTER_HEIGHT
    assert_shape(outs['in:out'].shape, W, H, u.NUM_INPUTS)
    assert_shape(outs['hid1:out'].shape, W - w + 1, h + 1 - H, u.NUM_HID1)
    assert_shape(outs['hid2:out'].shape, W - 2 * w + 2, H - 2 * h + 2, u.NUM_HID2)
    u.assert_shape(outs['out:out'].shape, target)
dataset/ETHPy150Open lmjohns3/theanets/test/convolution_test.py/test_predict/swapped operands of `-`