parameters: (input_graph_def, input_node_names, output_node_names,
                             placeholder_type_enum)
return_statement: return optimized_graph_def
docstring: Applies a series of inference optimizations on the input graph.
  
    Args:
      input_graph_def: A GraphDef containing a training model.
      input_node_names: A list of names of the nodes that are fed inputs during
        inference.
      output_node_names: A list of names of the nodes that produce the final
        results.
      placeholder_type_enum: The AttrValue enum for the placeholder data type, or
          a list that specifies one value per input node name.
  
    Returns:
      An optimized version of the input graph.
docstring_summary: Applies a series of inference optimizations on the input graph.
docstring_tokens: Applies a series of inference optimizations on the input graph .
function: def optimize_for_inference(input_graph_def, input_node_names, output_node_names,
                             placeholder_type_enum):
    """Applies a series of inference optimizations on the input graph.
  
    Args:
      input_graph_def: A GraphDef containing a training model.
      input_node_names: A list of names of the nodes that are fed inputs during
        inference.
      output_node_names: A list of names of the nodes that produce the final
        results.
      placeholder_type_enum: The AttrValue enum for the placeholder data type, or
          a list that specifies one value per input node name.
  
    Returns:
      An optimized version of the input graph.
    """
    ensure_graph_is_valid(input_graph_def)
    optimized_graph_def = input_graph_def
    optimized_graph_def = strip_unused_lib.strip_unused(
        optimized_graph_def, input_node_names, output_node_names,
        placeholder_type_enum)
    optimized_graph_def = graph_util.remove_training_nodes(
        optimized_graph_def, output_node_names)
    optimized_graph_def = fold_batch_norms(optimized_graph_def)
    optimized_graph_def = fuse_resize_and_conv(optimized_graph_def,
                                               output_node_names)
    ensure_graph_is_valid(optimized_graph_def)
    return optimized_graph_def
function_tokens: def optimize_for_inference ( input_graph_def , input_node_names , output_node_names , placeholder_type_enum ) : ensure_graph_is_valid ( input_graph_def ) optimized_graph_def = input_graph_def optimized_graph_def = strip_unused_lib . strip_unused ( optimized_graph_def , input_node_names , output_node_names , placeholder_type_enum ) optimized_graph_def = graph_util . remove_training_nodes ( optimized_graph_def , output_node_names ) optimized_graph_def = fold_batch_norms ( optimized_graph_def ) optimized_graph_def = fuse_resize_and_conv ( optimized_graph_def , output_node_names ) ensure_graph_is_valid ( optimized_graph_def ) return optimized_graph_def