code: def _get_input(proto):
      
      layer = caffe_parser.get_layers(proto)
      if len(proto.input_dim) > 0:
          input_dim = proto.input_dim
      elif len(proto.input_shape) > 0:
          input_dim = proto.input_shape[0].dim
      elif layer[0].type == "Input":
          input_dim = layer[0].input_param.shape[0].dim
          layer.pop(0)
      else:
          raise ValueError('Cannot find input size')
  
      assert layer[0].type != "Input", 'only support single input'
      # We assume the first bottom blob of first layer is the output from data layer
      input_name = layer[0].bottom[0]
      return input_name, input_dim, layer
docs: Get input size