Method Pad
Pad(ReadOnlySpan<int>)
Creates a TensorShape by padding axes. For example, if this is (1, 2, 3), and pads is {0, 0, 1, 0, 2, 2}, the method returns (1, 3, 7).
Declaration
public TensorShape Pad(ReadOnlySpan<int> pads)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<int> | pads | The lower and upper padding values for each dimension. For example [pad_left, pad_right] for 1D, or [pad_top, pad_bottom, pad_left, pad_right] for 2D. |
Returns
| Type | Description |
|---|---|
| TensorShape | The padded tensor shape. |