parameters: (graph, run_meta=None)
return_statement: return logged_ops
docstring: Extract trainable model parameters and FLOPs for ops from a Graph.
  
    Args:
      graph: tf.Graph.
      run_meta: RunMetadata proto used to complete shape information.
    Returns:
      logged_ops: dict mapping from op_name to OpLogEntry.
docstring_summary: Extract trainable model parameters and FLOPs for ops from a Graph.
docstring_tokens: Extract trainable model parameters and FLOPs for ops from a Graph .
function: def _get_logged_ops(graph, run_meta=None):
    """Extract trainable model parameters and FLOPs for ops from a Graph.
  
    Args:
      graph: tf.Graph.
      run_meta: RunMetadata proto used to complete shape information.
    Returns:
      logged_ops: dict mapping from op_name to OpLogEntry.
    """
    if run_meta:
      graph = _fill_missing_graph_shape(graph, run_meta)
  
    logged_ops = {}
    graph_def = graph.as_graph_def()
    for node in graph_def.node:
      try:
        stats = ops.get_stats_for_node_def(graph, node, REGISTERED_FLOP_STATS)
      except ValueError:
        # Catch Exception When shape is incomplete. Skip it.
        stats = None
  
      if not stats or not stats.value:
        continue
      if node.name not in logged_ops:
        entry = tfprof_log_pb2.OpLogEntry()
        entry.name = node.name
        entry.float_ops = stats.value
        logged_ops[entry.name] = entry
  
    for v in graph.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES):
      if v.op.name not in logged_ops:
        entry = tfprof_log_pb2.OpLogEntry()
        entry.name = v.op.name
        entry.types.append(TRAINABLE_VARIABLES)
        logged_ops[entry.name] = entry
      else:
        logged_ops[v.op.name].types.append(TRAINABLE_VARIABLES)
    return logged_ops
function_tokens: def _get_logged_ops ( graph , run_meta = None ) : if run_meta : graph = _fill_missing_graph_shape ( graph , run_meta ) logged_ops = { } graph_def = graph . as_graph_def ( ) for node in graph_def . node : try : stats = ops . get_stats_for_node_def ( graph , node , REGISTERED_FLOP_STATS ) except ValueError : # Catch Exception When shape is incomplete. Skip it. stats = None if not stats or not stats . value : continue if node . name not in logged_ops : entry = tfprof_log_pb2 . OpLogEntry ( ) entry . name = node . name entry . float_ops = stats . value logged_ops [ entry . name ] = entry for v in graph . get_collection ( tf . GraphKeys . TRAINABLE_VARIABLES ) : if v . op . name not in logged_ops : entry = tfprof_log_pb2 . OpLogEntry ( ) entry . name = v . op . name entry . types . append ( TRAINABLE_VARIABLES ) logged_ops [ entry . name ] = entry else : logged_ops [ v . op . name ] . types . append ( TRAINABLE_VARIABLES ) return logged_ops