TrainingExtensions/tensorflow/src/python/aimet_tensorflow/keras/batch_norm_fold.py
def _get_bias_tensor(conv_linear: LAYER_TYPE) -> libpymo.TensorParams():
    """
    Get bias tensor in given conv layer.

    Packs bias in the format required for BN fold
    (libpymo.TensorParams()).
    :param conv_linear: conv Layer
    :return: return bias param in libpymo.TensorParams() format.
    """

    bias_tensor = libpymo.TensorParams()
    if conv_linear.bias is not None:
        bias_tensor.data = conv_linear.bias.numpy().reshape(-1)
        bias_tensor.shape = np.array(conv_linear.bias.shape)

    return bias_tensor

    Get bias tensor in given conv layer.

    Packs bias in the format required for BN fold
    (libpymo.TensorParams()).
    :param conv_linear: conv Layer
    :return: return bias param in libpymo.TensorParams() format.
    
Get bias tensor in given conv layer.
Packs bias in the format required for BN fold
(libpymo.TensorParams()).
Get bias tensor in given conv layer . Packs bias in the format required for BN fold ( libpymo . TensorParams () ) .
def _get_bias_tensor(conv_linear: LAYER_TYPE) -> libpymo.TensorParams():
    bias_tensor = libpymo.TensorParams()
    if conv_linear.bias is not None:
        bias_tensor.data = conv_linear.bias.numpy().reshape(-1)
        bias_tensor.shape = np.array(conv_linear.bias.shape)
    return bias_tensor
def _get_bias_tensor ( conv_linear : LAYER_TYPE ) -> libpymo . TensorParams ( ) : bias_tensor = libpymo . TensorParams ( ) if conv_linear . bias is not None : bias_tensor . data = conv_linear . bias . numpy ( ) . reshape ( - 1 ) bias_tensor . shape = np . array ( conv_linear . bias . shape ) return bias_tensor
Get bias tensor in given conv layer.
Get bias tensor in given conv layer .
"""
    Get bias tensor in given conv layer.

    Packs bias in the format required for BN fold
    (libpymo.TensorParams()).
    :param conv_linear: conv Layer
    :return: return bias param in libpymo.TensorParams() format.
    """
return bias param in libpymo.TensorParams() format.
return bias param in libpymo . TensorParams () format .
conv_linear
LAYER_TYPE
None