Show / Hide Table of Contents

    Method onesLike

    static member onesLike: Tensor<'T> -> Tensor<'T>

    Creates a new tensor filled with ones using the specified tensor as template.

    Declaration
    static member onesLike: tmpl:Tensor<'T> -> Tensor<'T>
    Parameters
    Type Name Description
    Tensor<'T> tmpl

    The template tensor.

    Returns
    Type Description
    Tensor<'T>

    The new tensor.

    Remarks

    A new tensor is created with the same shape and on the same device as tmpl.

    The tensor is filled with ones.

    See Also
    static member ones: ITensorDevice -> int64 list -> Tensor<'T>
    Back to top Generated by DocFX