Contents

batchNorm(mean:variance:weight:bias:epsilon:)

Adds a batch normalization operation to the current graph.

Declaration

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

Parameters

  • mean:

    The precomputed mean values.

  • variance:

    The precomputed variances.

  • weight:

    The weight values.

  • bias:

    The bias values.

  • epsilon:

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