OP_LOGE_FOR_INVALID_LISTSIZE
Description
Records and reports a parameter list size error. If the specified parameter list size (number of elements) of an operator is not as expected, an error log is generated and the error code EZ0025 is reported.
Prototype
OP_LOGE_FOR_INVALID_LISTSIZE(entityName, paramName, incorrectSize, correctSize)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
entityName |
Input |
Operator name or aclnn API name. The type can be const char* or std::string. |
paramName |
Input |
Parameter name. The type can be const char* or std::string. |
incorrectSize |
Input |
Actual list size. The type can be const char* or std::string. |
correctSize |
Input |
Expected list size. The type can be const char* or std::string. |
Return Value
None.
Constraints
None.
Example
The following sample code is for reference only. Do not copy and run it.
1 2 3 4 5 6 | // Expected output: Parameter axes of SoftmaxV2 has incorrect element nums 2. It should be 1. if (axes->GetSize() != 1) { OP_LOGE_FOR_INVALID_LISTSIZE("SoftmaxV2", "axes", std::to_string(axes->GetSize()), "1"); return ge::GRAPH_FAILED; } |
Parent topic: log