コード例 #1
0
def test_tuplify_three(model1, model2, model3):
    model = tuplify(model1, model2, model3)
    assert len(model.layers) == 3
コード例 #2
0
def test_tuplify_dulicates_input():
    model = tuplify(noop(), noop())
    ones = numpy.ones([10])
    out = model.predict(ones)
    assert out == (ones, ones)
コード例 #3
0
def test_tuplify_two(model1, model2):
    model = tuplify(model1, model2)
    assert len(model.layers) == 2
コード例 #4
0
def test_tuplify_one(model1):
    with pytest.raises(TypeError):
        tuplify(model1)
コード例 #5
0
def test_tuplify_zero():
    with pytest.raises(TypeError):
        tuplify()
コード例 #6
0
ファイル: test_combinators.py プロジェクト: admariner/thinc
def test_tuplify_initialize(nI, nO):
    linear = Linear(nO)
    model = tuplify(linear, linear)
    ones = numpy.ones((1, nI), dtype="float")
    model.initialize(X=ones)