class_docstr: Convert layer data arrays to a dictionary mapping parameter names to their values.
class_docstr_tok: ["Convert","layer","data","arrays","to","a","dictionary","mapping","parameter","names","to","their","values","."]
code: def __call__(self, graph):
      for node in graph.nodes:
          if node.data is None:
              continue
          if node.kind in (
              NodeKind.Convolution,
              NodeKind.Deconvolution,
              NodeKind.InnerProduct,
          ):
              names = ("weights",)
              if node.parameters.bias_term:
                  names += ("bias",)
          elif node.kind == NodeKind.BatchNorm:
              names = ("mean", "var")
              if len(node.data) == 4:
                  names += ("scale", "bias")
          elif node.kind == NodeKind.PReLU:
              names = ("gamma",)
          elif node.kind == NodeKind.ELU:
              names = ("alpha",)
          else:
              print_stderr(
                  "WARNING: Unhandled parameters: {}".format(node.kind)
              )
              continue
          assert len(names) == len(node.data)
          node.data = dict(zip(names, node.data))
      return graph
  
imports: from __future__ import unicode_literals
  from google.protobuf import text_format
  import numpy
  from mmdnn.conversion.caffe.graph import GraphBuilder, NodeKind, LAYER_IN_TRAIN_PROTO
  from mmdnn.conversion.caffe.mapper import NodeMapper, get_handler_name
  from mmdnn.conversion.caffe.resolver import get_caffe_resolver, has_pycaffe
  from mmdnn.conversion.caffe.errors import print_stderr, ConversionError
  from mmdnn.conversion.caffe.common_graph import Graph
  from mmdnn.conversion.caffe.utils import get_lower_case, get_upper_case
label_desc: Use image node_id 1 for calling the ParameterNamer obj's underlying member method code with example usage: obj.__call__(graph) and returns: graph