Method SetTensorLayout
SetTensorLayout(int, int, int, int)
Sets the layout of the input tensor with four int values.
Declaration
public TextureTransform SetTensorLayout(int tensorLayoutAxisN, int tensorLayoutAxisC, int tensorLayoutAxisH, int tensorLayoutAxisW)
Parameters
Type | Name | Description |
---|---|---|
int | tensorLayoutAxisN | The axis in the tensor for the batch size of the texture. |
int | tensorLayoutAxisC | The axis in the tensor for the channel count of the texture. |
int | tensorLayoutAxisH | The axis in the tensor for the height of the texture. |
int | tensorLayoutAxisW | The axis in the tensor for the width of the texture. |
Returns
Type | Description |
---|---|
TextureTransform |
|
SetTensorLayout(TensorLayout)
Sets the layout of the input tensor with a TensorLayout
object, for example TensorLayout.NHWC
. The default is TensorLayout.NCHW
.
Declaration
public TextureTransform SetTensorLayout(TensorLayout tensorLayout)
Parameters
Type | Name | Description |
---|---|---|
TensorLayout | tensorLayout |
Returns
Type | Description |
---|---|
TextureTransform |
|
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown if unknown |