Function: infer_shape
C Prototype |
aclError aclopInferShape(const char *opType, int numInputs, aclTensorDesc *inputDesc[], aclDataBuffer *inputs[], int numOutputs, aclTensorDesc *outputDesc[], aclopAttr *attr) |
|---|---|
Python Function |
ret = acl.op.infer_shape(op_type, in_desc_list, in_list, num_outputs, out_desc_list, attr) |
Function Usage |
Infers the output shape of an operator based on the input shape and other necessary arguments. |
Input Description |
op_type: int, operator type name. in_desc_list: list, description of the operator input tensor. Call acl.create_tensor_desc to create data of the aclTensorDesc type in advance. in_list: list, input tensor of the operator. Determine the allocation of memory for storing the input tensor data of the operator. If the app runs on the host, allocate host memory. If the app runs on the device, allocate device memory. For details about the memory allocation API, see memory management. num_outputs: int, number of output tensors of the operator. attr: int, attribute address object of the operator. |
Return Value |
out_desc_list: list, description of the operator output tensor. Call acl.create_tensor_desc to create data of the aclTensorDesc type in advance. The number of elements in the out_desc_list list must be the same as the value of num_outputs. ret: int, error code.
|
Restrictions |
|