def test_tuplify_three(model1, model2, model3): model = tuplify(model1, model2, model3) assert len(model.layers) == 3
def test_tuplify_dulicates_input(): model = tuplify(noop(), noop()) ones = numpy.ones([10]) out = model.predict(ones) assert out == (ones, ones)
def test_tuplify_two(model1, model2): model = tuplify(model1, model2) assert len(model.layers) == 2
def test_tuplify_one(model1): with pytest.raises(TypeError): tuplify(model1)
def test_tuplify_zero(): with pytest.raises(TypeError): tuplify()
def test_tuplify_initialize(nI, nO): linear = Linear(nO) model = tuplify(linear, linear) ones = numpy.ones((1, nI), dtype="float") model.initialize(X=ones)