<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "macCatalyst: 14.0.0 - 17.4.0",
    "macOS: 11.0.0 - 14.3.0",
    "tvOS: 14.0.0 - 17.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCTensor/init(sequenceLength:featureChannelCount:batchSize:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCTensor(cm)tensorWithSequenceLength:featureChannelCount:batchSize:"
  },
  "title" : "init(sequenceLength:featureChannelCount:batchSize:)"
}
-->

# init(sequenceLength:featureChannelCount:batchSize:)

Creates a tensor without data, with the sequence length, number of feature channels, and batch size you specify.

```
convenience init(sequenceLength: Int, featureChannelCount: Int, batchSize: Int)
```

## Parameters

`sequenceLength`

The length of sequences stored in the tensor.

`featureChannelCount`

The number of feature channels.

`batchSize`

The tensor batch size.

## Discussion

The tensor data type is [`MLCDataType.float32`](/documentation/MLCompute/MLCDataType/float32). This tensor is typically used by a recurrent layer.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)