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

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

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

## Declaration

```swift
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

Discussion The tensor data type is MLCDataType.float32.

## See Also

### Creating Tensors by Specifying Shape

- [init(shape:)](mlcompute/mlctensor/init(shape:).md)
- [init(shape:dataType:)](mlcompute/mlctensor/init(shape:datatype:).md)
- [init(shape:data:dataType:)](mlcompute/mlctensor/init(shape:data:datatype:).md)
- [init(shape:fillWithData:dataType:)](mlcompute/mlctensor/init(shape:fillwithdata:datatype:).md)
- [init(shape:randomInitializerType:)](mlcompute/mlctensor/init(shape:randominitializertype:).md)
- [init(width:height:featureChannelCount:batchSize:data:)](mlcompute/mlctensor/init(width:height:featurechannelcount:batchsize:data:).md)
- [init(width:height:featureChannelCount:batchSize:data:dataType:)](mlcompute/mlctensor/init(width:height:featurechannelcount:batchsize:data:datatype:).md)
- [init(width:height:featureChannelCount:batchSize:fillWithData:dataType:)](mlcompute/mlctensor/init(width:height:featurechannelcount:batchsize:fillwithdata:datatype:).md)
- [init(width:height:featureChannelCount:batchSize:randomInitializerType:)](mlcompute/mlctensor/init(width:height:featurechannelcount:batchsize:randominitializertype:).md)
