• Preparing search index...
  • The search index is not available
@vladmandic/face-api - v1.7.15
  • @vladmandic/face-api
  • tf
  • batchNorm

Function batchNorm

  • batchNorm<R extends Rank>(
        x: TensorLike | tf.Tensor<R>,
        mean: Tensor1D | TensorLike | tf.Tensor<R>,
        variance: Tensor1D | TensorLike | tf.Tensor<R>,
        offset?: Tensor1D | TensorLike | tf.Tensor<R>,
        scale?: Tensor1D | TensorLike | tf.Tensor<R>,
        varianceEpsilon?: number,
    ): tf.Tensor<R>
  • Batch normalization.

    As described in http://arxiv.org/abs/1502.03167.

    Mean, variance, scale, and offset can be of two shapes:

    • The same shape as the input.
    • In the common case, the depth dimension is the last dimension of x, so the values would be a tf.Tensor1D of shape [depth].

    Also available are stricter rank-specific methods with the same signature as this method that assert that parameters passed are of given rank

    • tf.batchNorm2d
    • tf.batchNorm3d
    • tf.batchNorm4d

    Type Parameters

    • R extends Rank

    Parameters

    • x: TensorLike | tf.Tensor<R>

      The input Tensor.

    • mean: Tensor1D | TensorLike | tf.Tensor<R>

      A mean Tensor.

    • variance: Tensor1D | TensorLike | tf.Tensor<R>

      A variance Tensor.

    • Optionaloffset: Tensor1D | TensorLike | tf.Tensor<R>

      An offset Tensor.

    • Optionalscale: Tensor1D | TensorLike | tf.Tensor<R>

      A scale Tensor.

    • OptionalvarianceEpsilon: number

      A small float number to avoid dividing by 0.

    Returns tf.Tensor<R>

    Doc

    • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@4.22.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm.d.ts:47

Settings

Member Visibility
@vladmandic/face-api - v1.7.15
  • Loading...