---
title: shape
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Property
path: metalperformanceshadersgraph/mpsgraphtensor/shape
---

# shape

The shape of the tensor.

## Declaration

```swift
var shape: [NSNumber]? { get }
```

## Discussion

Discussion Nil shape represents an unranked tensor. -1 value for a dimension represents that it will be resolved via shape inference at runtime and it can be anything.
