Contents

allocate(initializingFrom:shape:batchSize:)

Returns a new n-dimensional array descriptor that’s initialized with a copy of the elements in the specified collection.

Declaration

static func allocate<C>(initializingFrom source: C, shape: BNNS.Shape, batchSize: Int = 1) -> BNNSNDArrayDescriptor where C : Collection, C.Element : BNNSScalar

Parameters

  • source:

    The collection that provides the source elements.

  • shape:

    The shape of n-dimensional array descriptor.

  • batchSize:

    The number of batches of data.

See Also

Allocating and Deallocating Memory