parameters: (layer, quantize_info, key)
docstring: Get the quantize pos of layer:key in quantize_info.
docstring_summary: Get the quantize pos of layer:key in quantize_info.
docstring_tokens: Get the quantize pos of layer : key in quantize_info .
function: def _get_pos(layer, quantize_info, key):
    """Get the quantize pos of layer:key in quantize_info."""
    if isinstance(layer, vitis_quantize_wrapper.QuantizeWrapper):
      q_info = quantize_info[layer.layer.name]
  
      # Recursive searching for layers with empty quantize info to skip some
      # special layers which are transparent to quantization, such as Reshape,
      # Flatten and ZeroPadding2D layers.
      if not q_info:
        pre_layer = layer.inbound_nodes[0].inbound_layers
        return _get_pos(pre_layer, quantize_info, key)
  
      for k, v in q_info.items():
        if key == 'w' and v.get('type') == 'weight' and k.endswith('kernel:0'):
          return v['info']['quant_pos_var']
        elif key == 'b' and v.get('type') == 'weight' and k.endswith('bias:0'):
          return v['info']['quant_pos_var']
        elif key == 'o':
          if v.get('type') in ['post_activation', 'pre_activation', 'output']:
            return v['info']['quant_pos_var']
    elif isinstance(layer, vitis_quantize_layer.VitisQuantize):
      if key == 'o':
        q_info = quantize_info[layer.name]
        return q_info['info']['quant_pos_var']
    else:
      return None
function_tokens: def _get_pos ( layer , quantize_info , key ) : if isinstance ( layer , vitis_quantize_wrapper . QuantizeWrapper ) : q_info = quantize_info [ layer . layer . name ] # Recursive searching for layers with empty quantize info to skip some # special layers which are transparent to quantization, such as Reshape, # Flatten and ZeroPadding2D layers. if not q_info : pre_layer = layer . inbound_nodes [ 0 ] . inbound_layers return _get_pos ( pre_layer , quantize_info , key ) for k , v in q_info . items ( ) : if key == 'w' and v . get ( 'type' ) == 'weight' and k . endswith ( 'kernel:0' ) : return v [ 'info' ] [ 'quant_pos_var' ] elif key == 'b' and v . get ( 'type' ) == 'weight' and k . endswith ( 'bias:0' ) : return v [ 'info' ] [ 'quant_pos_var' ] elif key == 'o' : if v . get ( 'type' ) in [ 'post_activation' , 'pre_activation' , 'output' ] : return v [ 'info' ] [ 'quant_pos_var' ] elif isinstance ( layer , vitis_quantize_layer . VitisQuantize ) : if key == 'o' : q_info = quantize_info [ layer . name ] return q_info [ 'info' ] [ 'quant_pos_var' ] else : return None