def METHOD_NAME(self,
                            output_dir: str,
                            rtol=None,
                            atol=None,
                            **kwargs):
    input_saver_def = self.pipeline.model_loader.as_saver_def()
    inference_graph_def = tf.get_default_graph().as_graph_def()
    for node in inference_graph_def.node:
        node.device = ''
    frozen_dir = os.path.join(output_dir, 'frozen')
    tf.gfile.MkDir(frozen_dir)
    frozen_graph_path = os.path.join(frozen_dir,
                                     'frozen_inference_graph.pb')
    outputs = {
        'output_trans_result':
        tf.identity(
            self.pipeline.output['output_seqs'],
            name='NmtModel/output_trans_result')
    }
    for output_key in outputs:
        tf.add_to_collection('inference_op', outputs[output_key])
    output_node_names = ','.join([
        '%s/%s' % ('NmtModel', output_key)
        for output_key in outputs.keys()
    ])
    print(output_node_names)
    _ = freeze_graph.freeze_graph_with_def_protos(
        input_graph_def=tf.get_default_graph().as_graph_def(),
        input_saver_def=input_saver_def,
        input_checkpoint=self.pipeline.model_path,
        output_node_names=output_node_names,
        restore_op_name='save/restore_all',
        filename_tensor_name='save/Const:0',
        output_graph=frozen_graph_path,
        clear_devices=True,
        initializer_nodes='')
    # 5. test frozen.pb
    dummy_inputs = self.generate_dummy_inputs()
    with self.pipeline._session.as_default() as sess:
        sess.run(tf.tables_initializer())
        graph = tf.Graph()
        with tf.gfile.GFile(frozen_graph_path, 'rb') as f:
            graph_def = tf.GraphDef()
            graph_def.ParseFromString(f.read())
        with graph.as_default():
            tf.import_graph_def(graph_def, name='')
        graph.finalize()
        with tf.Session(graph=graph) as trans_sess:
            outputs = trans_sess.run(
                'NmtModel/strided_slice_9:0',
                feed_dict={'input_wids:0': 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 frozen graphdef failed because of validation error.')
    return {'model': frozen_graph_path}