Contents

allocate(randomIn:shape:batchSize:)

Returns a new n-dimensional array descriptor that’s initialized with random values within the specified range.

Declaration

static func allocate<Scalar>(randomIn range: ClosedRange<Scalar>, shape: BNNS.Shape, batchSize: Int = 1) -> BNNSNDArrayDescriptor where Scalar : BNNSScalar, Scalar : FixedWidthInteger

Parameters

  • range:

    The range in which to create random values.

  • shape:

    The shape of n-dimensional array descriptor.

  • batchSize:

    The number of batches of data.

See Also

Allocating and Deallocating Memory