@combinations.generate(strategy_combinations())
def test_calling_model_with_nested_numpy_arrays(self, distribution):
    with self.cached_session():
        model = multi_input_output_model()
        optimizer = gradient_descent.GradientDescentOptimizer(learning_rate=0.001)
        loss = 'mse'
        model.compile(optimizer, loss, distribute=distribution)
        input_a_np = np.asarray(np.random.random((64, 3)), dtype=np.float32)
        input_b_np = np.asarray(np.random.random((64, 5)), dtype=np.float32)
        inputs = [input_a_np, input_b_np]
        output_d_np = np.asarray(np.random.random((64, 7)), dtype=np.float32)
        output_e_np = np.asarray(np.random.random((64, 7)), dtype=np.float32)
        targets = [output_d_np, output_e_np]
        model.fit(inputs, targets, epochs=1, batch_size=8, verbose=0)
        model.evaluate(inputs, targets)
        model.evaluate(inputs, targets, steps=2)
        model.evaluate(inputs, targets, batch_size=8)
        model.predict(inputs)
        model.predict(inputs, steps=2)
        model.predict(inputs, batch_size=8)
@combinations.generate(strategy_combinations())
def test_calling_model_with_nested_numpy_arrays(self, distribution):
    with self.cached_session():
        model = multi_input_output_model()
        optimizer = gradient_descent.GradientDescentOptimizer(learning_rate=0.001)
        loss = 'mse'
        model.compile(optimizer, loss, distribute=distribution)
        input_a_np = np.asarray(np.random.random((64, 3)), dtype=np.float32)
        input_b_np = np.asarray(np.random.random((64, 5)), dtype=np.float32)
        inputs = [input_a_np, input_b_np]
        output_d_np = np.asarray(np.random.random((64, 7)), dtype=np.float32)
        output_e_np = np.asarray(np.random.random((64, 7)), dtype=np.float32)
        targets = [output_d_np, output_e_np]
        model.fit(inputs, targets, epochs=1, batch_size=8, verbose=0)
        model.evaluate(inputs, targets)
        model.evaluate(inputs, targets, steps=2)
        model.evaluate(inputs, targets, batch_size=8)
        model.predict(inputs)
        model.predict(inputs, steps=2)
        model.predict(inputs, batch_size=8)