parameters: (graph, input_to_ops_map, bn)
return_statement: return sum(1 for op in rsqrt_consumers if op.type == 'Mul') == 1
docstring: r"""Checks if batch norm  has scaling enabled.
  
    Difference between batch norm with scaling and without is that with scaling:
  
    Rsqrt -> mul -> mul_1
                \-> mul_2
  
    where
      mul multiplies gamma by inverse square root of EMA of batch variance,
      mul_1 multiplies output of mul with output from the base operation
        (convolution, FC or depthwise convolution),
      mul_2 multiplies output of mul with EMA of batch mean,
    and without scaling:
  
    Rsqrt -> mul
         \-> mul_1
  
    where
      mul multiplies the inverse square root of EMA of batch variance with output
        from the base operation,
      mul_1 multiplies inverse square root of EMA of batch variance with EMA
        of batch mean.
  
    Args:
      graph: Graph to inspect.
      input_to_ops_map: InputToOps object containing mapping from tensor's name
        to ops that take it as input.
      bn: Batch norm layer prefix string.
  
    Returns:
      A boolean indicating whether this batch norm layer has scaling enabled.
docstring_summary: r"""Checks if batch norm  has scaling enabled.
docstring_tokens: r Checks if batch norm has scaling enabled .
function: def _HasScaling(graph, input_to_ops_map, bn):
    r"""Checks if batch norm  has scaling enabled.
  
    Difference between batch norm with scaling and without is that with scaling:
  
    Rsqrt -> mul -> mul_1
                \-> mul_2
  
    where
      mul multiplies gamma by inverse square root of EMA of batch variance,
      mul_1 multiplies output of mul with output from the base operation
        (convolution, FC or depthwise convolution),
      mul_2 multiplies output of mul with EMA of batch mean,
    and without scaling:
  
    Rsqrt -> mul
         \-> mul_1
  
    where
      mul multiplies the inverse square root of EMA of batch variance with output
        from the base operation,
      mul_1 multiplies inverse square root of EMA of batch variance with EMA
        of batch mean.
  
    Args:
      graph: Graph to inspect.
      input_to_ops_map: InputToOps object containing mapping from tensor's name
        to ops that take it as input.
      bn: Batch norm layer prefix string.
  
    Returns:
      A boolean indicating whether this batch norm layer has scaling enabled.
    """
    rsqrt_op = graph.get_operation_by_name(bn + 'BatchNorm/batchnorm_1/Rsqrt')
    rsqrt_consumers = input_to_ops_map.ConsumerOperations(rsqrt_op)
  
    return sum(1 for op in rsqrt_consumers if op.type == 'Mul') == 1
function_tokens: def _HasScaling ( graph , input_to_ops_map , bn ) : rsqrt_op = graph . get_operation_by_name ( bn + 'BatchNorm/batchnorm_1/Rsqrt' ) rsqrt_consumers = input_to_ops_map . ConsumerOperations ( rsqrt_op ) return sum ( 1 for op in rsqrt_consumers if op . type == 'Mul' ) == 1