Contents

instanceNorm(weight:bias:epsilon:)

Adds a instance normalization operation to the current graph.

Declaration

func instanceNorm(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 instance normalization of self with an affine transform using weight and bias. weight and bias must be one-dimensional and have size selfx.shape[1]. self must be at least three-dimensional.