---
title: "init(width:height:featureChannelCount:batchSize:dataType:)"
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/mlctensordescriptor/init(width:height:featurechannelcount:batchsize:datatype:)"
---

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

Creates a tensor descriptor with the width and height, number of feature channels, batch size, and data type you specify.

## Declaration

```swift
convenience init?(width: Int, height: Int, featureChannelCount: Int, batchSize: Int, dataType: MLCDataType)
```

## Parameters

- `width`: The tensor width.
- `height`: The tensor height.
- `featureChannelCount`: The number of feature channels.
- `batchSize`: The tensor batch size.
- `dataType`: The tensor data type.

## Discussion

Discussion This initializer provides a convenient way for you to configure NCHW tensors used by convolutional layers.

## See Also

### Creating Tensor Descriptors

- [init(shape:dataType:)](mlcompute/mlctensordescriptor/init(shape:datatype:).md)
- [init(shape:sequenceLengths:sortedSequences:dataType:)](mlcompute/mlctensordescriptor/init(shape:sequencelengths:sortedsequences:datatype:).md)
- [init(width:height:featureChannelCount:batchSize:)](mlcompute/mlctensordescriptor/init(width:height:featurechannelcount:batchsize:).md)
- [init(convolutionWeightsWithInputFeatureChannelCount:outputFeatureChannelCount:dataType:)](mlcompute/mlctensordescriptor/init(convolutionweightswithinputfeaturechannelcount:outputfeaturechannelcount:datatype:).md)
- [init(convolutionWeightsWithWidth:height:inputFeatureChannelCount:outputFeatureChannelCount:dataType:)](mlcompute/mlctensordescriptor/init(convolutionweightswithwidth:height:inputfeaturechannelcount:outputfeaturechannelcount:datatype:).md)
- [init(convolutionBiasesWithFeatureChannelCount:dataType:)](mlcompute/mlctensordescriptor/init(convolutionbiaseswithfeaturechannelcount:datatype:).md)
- [maxTensorDimensions](mlcompute/mlctensordescriptor/maxtensordimensions.md)
