Method Unsqueeze
Unsqueeze(int)
Creates a TensorShape by duplicating this and inserting a dimension of size one at a given axis. For example if this is (2), and the value of axis is 0, the method returns (1, 2).
Declaration
public TensorShape Unsqueeze(int axis)
Parameters
| Type | Name | Description |
|---|---|---|
| int | axis | The axis at which to unsqueeze. |
Returns
| Type | Description |
|---|---|
| TensorShape | The unsqueezed tensor shape. |
Unsqueeze(ReadOnlySpan<int>)
Creates a TensorShape by duplicating this and inserting a dimension of size one at a given axis. For example if this is (2), and the value of axis is 0, the method returns (1, 2).
Declaration
public TensorShape Unsqueeze(ReadOnlySpan<int> axes)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<int> | axes | The axes at which to unsqueeze. |
Returns
| Type | Description |
|---|---|
| TensorShape | The unsqueezed tensor shape. |