def METHOD_NAME(self, output_dir, rtol=None, atol=None, **kwargs):
    def _generate_signature():
        receiver_tensors = {
            'input_wids':
            tf.saved_model.utils.build_tensor_info(
                self.pipeline.input_wids)
        }
        export_outputs = {
            'output_seqs':
            tf.saved_model.utils.build_tensor_info(
                self.pipeline.output['output_seqs'])
        }
        signature_def = tf.saved_model.signature_def_utils.build_signature_def(
            receiver_tensors, export_outputs,
            tf.saved_model.signature_constants.PREDICT_METHOD_NAME)
        return {'translation_signature': signature_def}
    with self.pipeline._session.as_default() as sess:
        builder = tf.saved_model.builder.SavedModelBuilder(output_dir)
        builder.add_meta_graph_and_variables(
            sess, [tag_constants.SERVING],
            signature_def_map=_generate_signature(),
            assets_collection=ops.get_collection(
                ops.GraphKeys.ASSET_FILEPATHS),
            clear_devices=True)
        builder.save()
    dummy_inputs = self.generate_dummy_inputs()
    with tf.Session(graph=tf.Graph()) as sess:
        # Restore model from the saved_model file, that is exported by TensorFlow estimator.
        MetaGraphDef = tf.saved_model.loader.load(sess, ['serve'],
                                                  output_dir)
        # SignatureDef protobuf
        SignatureDef_map = MetaGraphDef.signature_def
        SignatureDef = SignatureDef_map['translation_signature']
        # TensorInfo protobuf
        X_TensorInfo = SignatureDef.inputs['input_wids']
        y_TensorInfo = SignatureDef.outputs['output_seqs']
        X = tf.saved_model.utils.get_tensor_from_tensor_info(
            X_TensorInfo, sess.graph)
        y = tf.saved_model.utils.get_tensor_from_tensor_info(
            y_TensorInfo, sess.graph)
        outputs = sess.run(y, feed_dict={X: dummy_inputs['input_wids']})
        trans_result = self.pipeline.postprocess({'output_seqs': outputs})
        logger.info(trans_result)
    outputs_origin = self.pipeline.forward(
        {'input_ids': dummy_inputs['input_wids']})
    tols = {}
    if rtol is not None:
        tols['rtol'] = rtol
    if atol is not None:
        tols['atol'] = atol
    if not compare_arguments_nested('Output match failed', outputs,
                                    outputs_origin['output_seqs'], **tols):
        raise RuntimeError(
            'Export saved model failed because of validation error.')
    return {'model': output_dir}