Navigation
API > API/Runtime > API/Runtime/NNE
The concrete shape of a tensor.
Concrete tensor shapes are well defined through strictly positive values and thus have a defined volume.
| Name | FTensorShape |
| Type | class |
| Header File | /Engine/Source/Runtime/NNE/Public/NNETypes.h |
| Include Path | #include "NNETypes.h" |
Syntax
class FTensorShape
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTensorShape () |
Default construct a tensor shape. | NNETypes.h | |
FTensorShape
(
const FTensorShape& OtherShape |
Construct this tensor shape from another one. | NNETypes.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MaxRank | int32 | The maximum number of dimensions supported by the tensor shape, aka the rank. | NNETypes.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Data | TArray< uint32, TInlineAllocator< MaxRank > > | NNETypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TConstArrayView< uint32 > GetData() |
Get the dimensions of the tensor shape. | NNETypes.h | |
bool IsCompatibleWith
(
const FSymbolicTensorShape& SymbolicShape |
Check if this tensor shape is part of the ensemble of shapes defined by the symbolic shape. | NNETypes.h | |
int32 Rank() |
Get the number of dimensions of the tensor shape, aka the rank. | NNETypes.h | |
uint64 Volume() |
Get the number of elements in this tensor shape. | NNETypes.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FTensorShape Make
(
TConstArrayView< uint32 > Data |
Construct a tensor shape with the given dimensions. | NNETypes.h | |
static FTensorShape MakeFromSymbolic
(
const FSymbolicTensorShape& SymbolicShape |
Construct a tensor shape from a symbolic tensor shape. | NNETypes.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FTensorShape& OtherShape |
Check if the tensor shape is different from another one. | NNETypes.h | |
void operator=
(
const FTensorShape& OtherShape |
Assign this tensor shape from another one. | NNETypes.h | |
bool operator==
(
const FTensorShape& OtherShape |
Check if the tensor shape is equal to another one. | NNETypes.h |