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
init(shape:)init(shape:dataType:)init(shape:data:dataType:)init(shape:fillWithData:dataType:)init(width:height:featureChannelCount:batchSize:)init(width:height:featureChannelCount:batchSize:data:)init(width:height:featureChannelCount:batchSize:data:dataType:)init(width:height:featureChannelCount:batchSize:fillWithData:dataType:)init(width:height:featureChannelCount:batchSize:randomInitializerType:)