<!--
{
  "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(width:height:featureChannelCount:batchSize:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCTensor(cm)tensorWithWidth:height:featureChannelCount:batchSize:"
  },
  "title" : "init(width:height:featureChannelCount:batchSize:)"
}
-->

# init(width:height:featureChannelCount:batchSize:)

Creates a tensor without data, with the sizes and number of feature channels you specify.

```
convenience init(width: Int, height: Int, featureChannelCount: Int, batchSize: Int)
```

## Parameters

`width`

The tensor width.

`height`

The tensor height.

`featureChannelCount`

The number of feature channels.

`batchSize`

The tensor batch size.

## Discussion

The tensor data type is [`MLCDataType.float32`](/documentation/MLCompute/MLCDataType/float32).

---

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)