Function kaimingUniform_

  • Fills the input Tensor with values according to the method described in Delving deep into rectifiers: Surpassing human-level performance on ImageNet classification - He, K. et al. (2015), using a uniform distribution.

    The resulting tensor will have values sampled from U(-bound, bound) where bound = gain * sqrt(3/fanMode)

    Also known as He initialization.

    This is the default initializer for Conv and Linear layers.

    Parameters

    • tensor: Tensor

      n-dimensional

    • a: number = 0

      the negative slope of the rectifier used after this layer (only used with 'leakyRelu')

    • mode: "fanIn" | "fanOut" = "fanIn"

      either 'fanIn' (default) or 'fanOut'. Choosing 'fanIn' preserves the magnitude of the variance of the weights in the forward pass. Choosing 'fanOut' preserves the magnitudes in the backwards pass.

    • nonlinearity: LinearFunction | NonlinearFunction = "leakyRelu"

      the non-linear function, recommended to use only with 'relu' or 'leakyRelu' (default).

    Returns Tensor

Generated using TypeDoc