class_docstr: Benchmarking a function of a parametric function.
  
  This will calculate time to execute setup, forward and backward
  methods of Function class.
  
  Args:
      func (function): It can be a function in either
          :module:`nnabla.functions` or
          :module:`nnabla.parametric_functions`.
      inspecs (:obj:`list` of :obj:`Inspec`): A list of ``Inspec``.
          They specify shape, initializer, and need_grad attributes.
      func_args (list): A list of function arguments passed to func.
      func_kwargs (dict): Keyword arguments passed to func.
      ext (str): Extension module, e.g. 'cuda', 'cudnn'.
      ext_kwargs (dict): Keyword arguments passed to extension APIs,
          e.g. ``context(*kw)``, ``synchronize(**kw).
      min_run (int): Minimum number of calling function
  
  Note:
      You should not pass any compositional function
      (a function constructed by multiple Functions) to ``func`` argument.
      Benchmark will take place only in the last function instance in the
      chain of a compositional function.
class_docstr_tok: ["Benchmarking","a","function","of","a","parametric","function",".","This","will","calculate","time","to","execute","setup",",","forward","and","backward","methods","of","Function","class",".","Args",":","func","(","function",")",":","It","can","be","a","function","in","either",":","module",":","`","nnabla.functions","`","or",":","module",":","`","nnabla.parametric_functions","`",".","inspecs","(",":","obj",":","`","list","`","of",":","obj",":","`","Inspec","`",")",":","A","list","of","``","Inspec","``",".","They","specify","shape",",","initializer",",","and","need_grad","attributes",".","func_args","(","list",")",":","A","list","of","function","arguments","passed","to","func",".","func_kwargs","(","dict",")",":","Keyword","arguments","passed","to","func",".","ext","(","str",")",":","Extension","module",",","e.g",".","'cuda","'",",","'cudnn","'",".","ext_kwargs","(","dict",")",":","Keyword","arguments","passed","to","extension","APIs",",","e.g",".","``","context","(","*","kw",")","``",",","``","synchronize","(","*","*","kw",")",".","min_run","(","int",")",":","Minimum","number","of","calling","function","Note",":","You","should","not","pass","any","compositional","function","(","a","function","constructed","by","multiple","Functions",")","to","``","func","``","argument",".","Benchmark","will","take","place","only","in","the","last","function","instance","in","the","chain","of","a","compositional","function","."]
code: def __init__(
      self,
      func,
      inspecs,
      func_args,
      func_kwargs,
      ext,
      ext_kwargs,
      min_run=1,
      min_time=1.0,
  ):
      nn.clear_parameters()
      self.inputs = None
      self.outputs = None
      self.func_ins = None
      self.setup_stat = None
      self.forward_stat = None
      self.backward_stat = None
      self.func = func
      self.module = func.__module__
      self.inspecs = inspecs
      self.inputs_f = create_inputs(inspecs)
      self.func_args = func_args
      self.func_kwargs = func_kwargs
      self.ext = ext
      self.ext_kwargs = ext_kwargs
      self.mod_ext = importlib.import_module("." + ext, "nnabla_ext")
      self.ctx = self.mod_ext.context(**ext_kwargs)
      self.min_run = min_run
      self.min_time = min_time
  
imports: from __future__ import print_function
  import nnabla
  import nnabla.initializer
  import sys
  import importlib
  import time
  from collections import namedtuple
  import csv
label_desc: Use image node_id 1 to create a new FunctionBenchmark object  with example: obj = FunctionBenchmark(func, inspecs, func_args, func_kwargs, ext, ext_kwargs, min_run, min_time)