---
title: "init(sequenceLength:featureChannelCount:batchSize:randomInitializerType:)"
framework: ML Compute
role: symbol
role_heading: Initializer
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: "mlcompute/mlctensor/init(sequencelength:featurechannelcount:batchsize:randominitializertype:)"
---

# init(sequenceLength:featureChannelCount:batchSize:randomInitializerType:)

Creates a tensor with the sequence length, number of feature channels, batch size, and random initializer type you specify.

## Declaration

```swift
convenience init(sequenceLength: Int, featureChannelCount: Int, batchSize: Int, randomInitializerType: MLCRandomInitializerType)
```

## Parameters

- `sequenceLength`: The length of sequences stored in the tensor.
- `featureChannelCount`: The number of feature channels.
- `batchSize`: The tensor batch size.
- `randomInitializerType`: The random initializer type you use to generate random data.

## See Also

### Creating Tensors by Specifying Sequence Lengths

- [init(sequenceLength:featureChannelCount:batchSize:)](mlcompute/mlctensor/init(sequencelength:featurechannelcount:batchsize:).md)
- [init(sequenceLength:featureChannelCount:batchSize:data:)](mlcompute/mlctensor/init(sequencelength:featurechannelcount:batchsize:data:).md)
- [init(sequenceLengths:sortedSequences:featureChannelCount:batchSize:data:)](mlcompute/mlctensor/init(sequencelengths:sortedsequences:featurechannelcount:batchsize:data:).md)
- [init(sequenceLengths:sortedSequences:featureChannelCount:batchSize:randomInitializerType:)](mlcompute/mlctensor/init(sequencelengths:sortedsequences:featurechannelcount:batchsize:randominitializertype:).md)
