Contents

init(repeating:shape:)

Creates a tensor with the specified shape and a single, repeated scalar value.

Declaration

init(repeating repeatedValue: Float, shape: [Int])

Parameters

  • repeatedValue:

    The float value to repeat.

  • shape:

    The shape of the tensor.

See Also

Creating a tensor