parameters: (graph_file, input_binary, modifier_function_list=[])
return_statement: return graphdef
docstring: can load protobuf (pb or pbtxt). can modify only pbtxt for now
docstring_summary: can load protobuf (pb or pbtxt). can modify only pbtxt for now
docstring_tokens: can load protobuf ( pb or pbtxt ) . can modify only pbtxt for now
function: def load_file(graph_file, input_binary, modifier_function_list=[]):
      '''
      can load protobuf (pb or pbtxt). can modify only pbtxt for now
      '''
      if not gfile.Exists(graph_file):
          raise Exception("Input graph file '" + graph_file + "' does not exist!")
  
      graphdef = graph_pb2.GraphDef()
      with open(graph_file, "r") as f:
          protobuf_str = f.read()
          try:
              if input_binary:
                  graphdef.ParseFromString(protobuf_str)
              else:
                  text_format.Merge(protobuf_str, graphdef)
          except:
              raise Exception("Failed to read pb or pbtxt. input_binary is " +
                              str(input_binary) + " maybe try flipping it?")
      for modifier_function in modifier_function_list:
          graphdef = modifier_function(graphdef)
      return graphdef
function_tokens: def load_file ( graph_file , input_binary , modifier_function_list = [ ] ) : if not gfile . Exists ( graph_file ) : raise Exception ( "Input graph file '" + graph_file + "' does not exist!" ) graphdef = graph_pb2 . GraphDef ( ) with open ( graph_file , "r" ) as f : protobuf_str = f . read ( ) try : if input_binary : graphdef . ParseFromString ( protobuf_str ) else : text_format . Merge ( protobuf_str , graphdef ) except : raise Exception ( "Failed to read pb or pbtxt. input_binary is " + str ( input_binary ) + " maybe try flipping it?" ) for modifier_function in modifier_function_list : graphdef = modifier_function ( graphdef ) return graphdef