Show / Hide Table of Contents

    Method init

    val init: int64 list -> int64 [] -> 'T -> Tensor<'T>

    Creates a new tensor with values returned by the specified function using multiple threads.

    Declaration
    val init: shape:int64 list -> fn:int64 [] -> 'T -> Tensor<'T>
    Parameters
    Type Name Description
    int64 list shape

    The shape of the new tensor.

    int64 [] -> 'T fn

    A function that takes the index of the element to fill and returns the corresponding value.

    Returns
    Type Description
    Tensor<'T>
    Type Parameters
    Name Description
    'T
    See Also
    val FillIndexed: Tensor<'T> -> int64 [] -> 'T -> unit
    Back to top Generated by DocFX