Method BroadcastToRank
BroadcastToRank(int)
Creates a TensorShape of a given rank and with the same inner dimensions by adding outer dimensions of size 1 when needed.
For example, if the TensorShape is (256, 256, 3), and the value of rank is 5, the method returns (1, 1, 256, 256, 3).
Declaration
public TensorShape BroadcastToRank(int rank)
Parameters
| Type | Name | Description |
|---|---|---|
| int | rank | The rank to which to broadcast to. |
Returns
| Type | Description |
|---|---|
| TensorShape | The broadcast tensor shape. |