---
title: rank
framework: accelerate
role: symbol
role_heading: Instance Property
path: accelerate/bnnstensor/rank
---

# rank

The rank of the tensor.

## Declaration

```swift
var rank: UInt8
```

## Discussion

Discussion This value must be greater than or equal to zero, and less than or equal to BNNS_MAX_TENSOR_DIMENSION.

## See Also

### Specifying a tensor’s properties

- [data_type](accelerate/bnnstensor/data_type.md)
- [shape](accelerate/bnnstensor/shape.md)
- [stride](accelerate/bnnstensor/stride.md)
- [data](accelerate/bnnstensor/data.md)
- [data_size_in_bytes](accelerate/bnnstensor/data_size_in_bytes.md)
- [name](accelerate/bnnstensor/name.md)
