def test_multi_inputs_multi_outputs_with_input_fn_as_dict(self):
    (train_data, test_data) = get_multi_inputs_multi_outputs_data()

    def train_input_fn():
        input_dict = {'input_a': train_data['input_a'], 'input_b': train_data['input_b'], 'input_m': train_data['input_m'].astype(np.str)}
        output_dict = {'dense_2': train_data['output_c'], 'dense_3': train_data['output_d']}
        return dataset_ops.Dataset.from_tensor_slices((input_dict, output_dict)).batch(16)

    def eval_input_fn():
        input_dict = {'input_a': test_data['input_a'], 'input_b': test_data['input_b'], 'input_m': test_data['input_m'].astype(np.str)}
        output_dict = {'dense_2': test_data['output_c'], 'dense_3': test_data['output_d']}
        return dataset_ops.Dataset.from_tensor_slices((input_dict, output_dict)).batch(16)
    self.do_test_multi_inputs_multi_outputs_with_input_fn(train_input_fn, eval_input_fn)
def test_multi_inputs_multi_outputs_with_input_fn_as_dict(self):
    (train_data, test_data) = get_multi_inputs_multi_outputs_data()

    def train_input_fn():
        input_dict = {'input_a': train_data['input_a'], 'input_b': train_data['input_b'], 'input_m': train_data['input_m'].astype(np.str)}
        output_dict = {'dense_2': train_data['output_c'], 'dense_3': train_data['output_d']}
        return dataset_ops.Dataset.from_tensor_slices((input_dict, output_dict)).batch(16)

    def eval_input_fn():
        input_dict = {'input_a': test_data['input_a'], 'input_b': test_data['input_b'], 'input_m': test_data['input_m'].astype(np.str)}
        output_dict = {'dense_2': test_data['output_c'], 'dense_3': test_data['output_d']}
        return dataset_ops.Dataset.from_tensor_slices((input_dict, output_dict)).batch(16)
    self.do_test_multi_inputs_multi_outputs_with_input_fn(train_input_fn, eval_input_fn)