NumElements
Description
Obtains the number of tensor elements.
Prototype
int64_t NumElements() const
Parameters
None
Returns
int64_t for the number of tensor elements.
- If the return value is greater than or equal to 0, the operation is successful.
- If the return value is less than 0, the operation fails.
Restrictions
None
Example
int64_t num = tensor->NumElements();
Parent topic: Class Tensor