Contents

init(width:height:featureChannelCount:batchSize:randomInitializerType:)

Creates a tensor with the sizes, number of feature channels, and random data using the random initializer type you specify.

Declaration

convenience init(width: Int, height: Int, featureChannelCount: Int, batchSize: Int, randomInitializerType: MLCRandomInitializerType)

Parameters

  • width:

    The tensor width.

  • height:

    The tensor height.

  • featureChannelCount:

    The number of feature channels.

  • batchSize:

    The tensor batch size.

  • randomInitializerType:

    The random initializer type you use to generate random data.

See Also

Creating Tensors by Specifying Shape