class_docstr: Adapt Caffe prototxt and weights into uniform format
class_docstr_tok: ["Adapt","Caffe","prototxt","and","weights","into","uniform","format"]
code: def _adapt_net(self):
      raw_layers = self._raw_net.layer or self._raw_net.layers
      uni_model = self._uni_model
  
      data_providers = self._uni_model.data_provider
      scope_inputs = {}
      for data_provider in data_providers:
          scope_inputs[data_provider.op_name] = data_provider
  
      for raw_layer in raw_layers:
          if raw_layer.type == "Input":
              continue
          cntk_layer_type, caffe_layer_type = self._get_layer_type(
              raw_layer
          )
          if cntk_layer_type is None:
              if raw_layer.type not in NEGLECT_LAYERS:
                  sys.stderr.write("Non-decision type of CNTK\n")
                  raise AssertionError("Dangerous call\n")
              if (
                  raw_layer.type == "Scale"
                  and scope_inputs[raw_layer.bottom[0]].op_type
                  == cntkmodel.CntkLayerType.batch_norm
              ):
                  pass
              else:
                  sys.stderr.write(
                      "dangerous call of %s", raw_layer.name
                  )
              bottom_name = raw_layer.bottom[0]
              top_name = raw_layer.top[0]
              scope_inputs[top_name] = scope_inputs[bottom_name]
              continue
  
          # inputs
          bottom_names = raw_layer.bottom
          inputs_info = []
          for bottom_name in bottom_names:
              inputs_info.append(scope_inputs[bottom_name])
  
          # function
          cntk_layer_def = self._setup_cntk_layer_def(
              cntk_layer_type, raw_layer, inputs_info
          )
  
          # refresh the lists
          # only support single output operation
          if len(raw_layer.top) > 1:
              sys.stderr.write(
                  "Single output layers allowed currently: %s.%s\n"
                  % (str(cntk_layer_type), raw_layer.name)
              )
          top_names = raw_layer.top[0]
          scope_inputs[top_names] = cntk_layer_def
  
          # push into vectors
          uni_model.cntk_layers[raw_layer.name] = cntk_layer_def
          uni_model.cntk_sorted_layers.append(raw_layer.name)
  
imports: import sys
  import os
  import time
  import math
  from cntk.contrib.crosstalkcaffe.unimodel import cntkmodel
  from cntk.contrib.crosstalkcaffe.adapter import baseadapter
  from .None import caffeimpl
label_desc: Use image node_id 5 for calling the CaffeAdapter obj's underlying member method code with example usage: obj._adapt_net() without return types