Contents

channelNorm(weight:bias:epsilon:)

Adds a channel normalization operation to the current graph.

Declaration

func channelNorm(weight: some BNNSGraph.Builder.OperationParameter<T>, bias: some BNNSGraph.Builder.OperationParameter<T>, epsilon: Float = .ulpOfOne.squareRoot()) -> BNNSGraph.Builder.Tensor<T>

Parameters

  • weight:

    The weight values.

  • bias:

    The bias values.

  • epsilon:

    The epsilon value that the function uses to avoid division by zero.

Discussion

This function performs channel normalization of self with an affine transform using weight and bias. weight and bias must be one-dimensional and have size self.shape[1]. self must be at least three-dimensional.