OP_LOGE_WITH_INVALID_INPUT_FORMAT
Note: This API has been deprecated. Use OP_LOGE_FOR_INVALID_FORMAT instead.
Description
Records and reports an operator input format error. If the specified input parameter format of an operator is not as expected, an error log is generated and the error code EZ0006 is reported.
Prototype
OP_LOGE_WITH_INVALID_INPUT_FORMAT(entityName, paramName, dataFormat, expectedFormatList)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
entityName |
Input |
Operator name or aclnn API name. The type can be const char* or std::string. |
paramName |
Input |
Input parameter name. The type can be const char* or std::string. |
dataFormat |
Input |
Actual data format (for example, NHWC). The type can be const char* or std::string. |
expectedFormatList |
Input |
Expected format list (for example, NCHW, NCDHW). 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: Input parameter x of ResizeBilinearV2 has incorrect format ND. It should be NCHW or NHWC. if (format_ != NCHW && format_ != NHWC) { OP_LOGE_WITH_INVALID_INPUT_FORMAT("ResizeBilinearV2", "x", Ops::Base::ToString(format_).c_str(), "NCHW or NHWC"); return ge::GRAPH_FAILED; } |