class_docstr: Associates parameters loaded from a .caffemodel file with their corresponding nodes.
class_docstr_tok: ["Associates","parameters","loaded","from","a",".caffemodel","file","with","their","corresponding","nodes","."]
code: def normalize_pb_data(self, layer):
      transformed = []
      for blob in layer.blobs:
          if len(blob.shape.dim):
              dims = blob.shape.dim
              c_o, c_i, h, w = map(
                  int, [1] * (4 - len(dims)) + list(dims)
              )
          else:
              c_o = blob.num
              c_i = blob.channels
              h = blob.height
              w = blob.width
          data = np.array(blob.data, dtype=np.float32).reshape(
              c_o, c_i, h, w
          )
          transformed.append(data)
      return transformed
  
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 4 for calling the DataInjector obj's underlying member method code with example usage: obj.normalize_pb_data(layer) and returns: transformed