parameters: (self, device, input_shape, filter_shape, strides, padding,
                   num_iters, data_format)
return_statement: return duration
docstring: runs the graph and print its execution time.
  
      Args:
        device: String, the device to run on.
        input_shape: Shape of the input tensor.
        filter_shape: Shape of the filter tensor.
        strides: A list of ints. 1-D of length 4. The stride of sliding
                 window for each dimension of input.
        padding: A string from: "SAME", "VALID". The type of padding
                 algorithm to use.  num_iters: Number of iterations to run the
                   benchmark.
        num_iters: number of iterations to run conv2d.
        data_format: data format string of input, 'NHWC' and 'NCHW' are
        supported.
  
      Returns:
        The duration of the run in seconds.
docstring_summary: runs the graph and print its execution time.
docstring_tokens: runs the graph and print its execution time .
function: def _run_graph(self, device, input_shape, filter_shape, strides, padding,
                   num_iters, data_format):
      """runs the graph and print its execution time.
  
      Args:
        device: String, the device to run on.
        input_shape: Shape of the input tensor.
        filter_shape: Shape of the filter tensor.
        strides: A list of ints. 1-D of length 4. The stride of sliding
                 window for each dimension of input.
        padding: A string from: "SAME", "VALID". The type of padding
                 algorithm to use.  num_iters: Number of iterations to run the
                   benchmark.
        num_iters: number of iterations to run conv2d.
        data_format: data format string of input, 'NHWC' and 'NCHW' are
        supported.
  
      Returns:
        The duration of the run in seconds.
      """
      graph = ops.Graph()
      with graph.as_default():
        outputs = build_fused_conv_bias_relu_graph(device, input_shape,
                                                   filter_shape, strides, padding,
                                                   num_iters, data_format)
        with session_lib.Session(graph=graph) as session:
          variables.global_variables_initializer().run()
          # warmup runs
          session.run(outputs)
  
          start_time = time.time()
          session.run(outputs)
          duration = (time.time() - start_time) / num_iters
  
          print("%s inputshape:%s filtershape:%s strides:%s padding:%s "
                "%d iters: %.8f sec" % (device, str(input_shape).replace(" ", ""),
                                        str(filter_shape).replace(" ", ""),
                                        str(strides).replace(" ", ""), padding,
                                        num_iters, duration))
      name_template = (
          "conv2d_{device}_input_shape_{inputshape}_filter_shape_{filtershape}_"
          "strides_{strides}_padding_{padding}")
  
      self.report_benchmark(
          name=name_template.format(
              device=device,
              inputshape=str(input_shape).replace(" ", ""),
              filtershape=str(filter_shape).replace(" ", ""),
              strides=str(strides).replace(" ", ""),
              padding=padding).replace(" ", ""),
          iters=num_iters,
          wall_time=duration)
  
      return duration
function_tokens: def _run_graph ( self , device , input_shape , filter_shape , strides , padding , num_iters , data_format ) : graph = ops . Graph ( ) with graph . as_default ( ) : outputs = build_fused_conv_bias_relu_graph ( device , input_shape , filter_shape , strides , padding , num_iters , data_format ) with session_lib . Session ( graph = graph ) as session : variables . global_variables_initializer ( ) . run ( ) # warmup runs session . run ( outputs ) start_time = time . time ( ) session . run ( outputs ) duration = ( time . time ( ) - start_time ) / num_iters print ( "%s inputshape:%s filtershape:%s strides:%s padding:%s " "%d iters: %.8f sec" % ( device , str ( input_shape ) . replace ( " " , "" ) , str ( filter_shape ) . replace ( " " , "" ) , str ( strides ) . replace ( " " , "" ) , padding , num_iters , duration ) ) name_template = ( "conv2d_{device}_input_shape_{inputshape}_filter_shape_{filtershape}_" "strides_{strides}_padding_{padding}" ) self . report_benchmark ( name = name_template . format ( device = device , inputshape = str ( input_shape ) . replace ( " " , "" ) , filtershape = str ( filter_shape ) . replace ( " " , "" ) , strides = str ( strides ) . replace ( " " , "" ) , padding = padding ) . replace ( " " , "" ) , iters = num_iters , wall_time = duration ) return duration