目录

AutoMappingFn

Function Description

Callback function that implements automatic mapping.

Function Prototype

Status AutoMappingFn(const google::protobuf::Message *op_src, ge::Operator &op)

Parameters

Parameter Input/Output Description
op_src Input Operator in the original model before conversion, including the attributes of the operator in the original model.
op Input

Operator adapted to the AI processor.

For details about the Operator class, see Operator.

Restrictions

If the attributes of the original TensorFlow operator cannot be one-to-one mapped to those of the operator adapted to the AI processor, the AutoMappingFn function cannot be applied to the callback function ParseParamsByOperatorFn. In this case, use the AutoMappingByOpFn API in the callback function to automatically resolve the attributes that can be successfully mapped. For details about the usage example, see Calling Example.