![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <NNETypes.h>
Public Member Functions | |
| FTensorShape ()=default | |
| FTensorShape (const FTensorShape &OtherShape)=default | |
| TConstArrayView< uint32 > | GetData () const |
| int32 | Rank () const |
| NNE_API uint64 | Volume () const |
| NNE_API bool | IsCompatibleWith (const FSymbolicTensorShape &SymbolicShape) const |
| NNE_API bool | operator== (const FTensorShape &OtherShape) const |
| NNE_API bool | operator!= (const FTensorShape &OtherShape) const |
| NNE_API void | operator= (const FTensorShape &OtherShape) |
Static Public Member Functions | |
| static NNE_API FTensorShape | Make (TConstArrayView< uint32 > Data) |
| static NNE_API FTensorShape | MakeFromSymbolic (const FSymbolicTensorShape &SymbolicShape) |
Static Public Attributes | |
| static constexpr int32 | MaxRank = FSymbolicTensorShape::MaxRank |
The concrete shape of a tensor.
Concrete tensor shapes are well defined through strictly positive values and thus have a defined volume.
|
default |
Default construct a tensor shape.
|
default |
Construct this tensor shape from another one.
| OtherShape | the other tensor shape to copy from. |
|
inline |
Get the dimensions of the tensor shape.
| bool UE::NNE::FTensorShape::IsCompatibleWith | ( | const FSymbolicTensorShape & | SymbolicShape | ) | const |
Check if this tensor shape is part of the ensemble of shapes defined by the symbolic shape.
For example [1,2] is compatible with [-1,2] and [1,2] but not with [2,2] or [1,2,3].
|
static |
Construct a tensor shape with the given dimensions.
| Data | an array of dimensions. |
|
static |
Construct a tensor shape from a symbolic tensor shape.
Negative dimension values are replaced by 1.
| SymbolicShape | a symbolic tensor shape. |
| bool UE::NNE::FTensorShape::operator!= | ( | const FTensorShape & | OtherShape | ) | const |
Check if the tensor shape is different from another one.
| OtherShape | the other tensor shape. |
| void UE::NNE::FTensorShape::operator= | ( | const FTensorShape & | OtherShape | ) |
Assign this tensor shape from another one.
| OtherShape | the other tensor shape to copy from. |
| bool UE::NNE::FTensorShape::operator== | ( | const FTensorShape & | OtherShape | ) | const |
Check if the tensor shape is equal to another one.
| OtherShape | the other tensor shape. |
|
inline |
Get the number of dimensions of the tensor shape, aka the rank.
| uint64 UE::NNE::FTensorShape::Volume | ( | ) | const |
Get the number of elements in this tensor shape.
The maximum number of dimensions supported by the tensor shape, aka the rank.