ELMTWISE_INFER_SHAPEANDTYPE
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File
#include <graph/operator_reg.h>
Function Usage
Encapsulates the macro of common functions, facilitating the development of the InferShape function. This API sets the output shape and dtype based on the input shape and dtype.
For example, if the input shape is (1, 2, 3, 4) and input dtype is float, the macro sets the output shape to (1, 2, 3, 4) and the output dtype to float.
Prototype
1 | ELMTWISE_INFER_SHAPEANDTYPE(in_name, out_name) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
in_name |
Input |
Operator input. |
out_name |
Input |
Operator output. |
Returns
Success or failure.
Constraints
None
Examples
1 | COMMON_INFER_FUNC_REG(DiagD, ELMTWISE_INFER_SHAPEANDTYPE("assist", "y")); |
Parent topic: Data Structures and APIs