Contents

init(shape:randomInitializerType:)

Creates a tensor with the shape and random initializer type you specify.

Declaration

convenience init(shape: [Int], randomInitializerType: MLCRandomInitializerType)

Parameters

  • shape:

    An array that contains the sizes of each dimension.

  • randomInitializerType:

    The random initializer type you use to generate random data.

See Also

Creating Tensors by Specifying Shape