Contents

init(sequenceLengths:sortedSequences:featureChannelCount:batchSize:data:)

Creates a tensor with the sequence lengths, sorting indicator, number of feature channels, batch size, and data you specify.

Declaration

convenience init?(sequenceLengths: [Int], sortedSequences: Bool, featureChannelCount: Int, batchSize: Int, data: MLCTensorData? = nil)

Parameters

  • sequenceLengths:

    An array that contains the variable lengths of sequences stored in the tensor.

  • sortedSequences:

    A Boolean that indicates whether you provide the sequence lengths sorted in descending order.

  • featureChannelCount:

    The number of feature channels.

  • batchSize:

    The tensor batch size.

  • data:

    The tensor data.

See Also

Creating Tensors by Specifying Sequence Lengths