aclgrphConvertToWeightRefreshableGraphs
Applicable Products
All processors
Header File/Library File
- Header file: #include <ge/ge_ir_build.h>
- Library file: libge_compiler.so
Function Usage
Converts the original graph into a group of graphs whose weights can be updated by passing the const node name array.
Applies to the weight update scenario. For details, see Weight Update.
Prototype
1
|
graphStatus aclgrphConvertToWeightRefreshableGraphs(const ge::Graph &origin_graph, const std::vector<AscendString> &const_names, WeightRefreshableGraphs &weight_refreshable_graphs) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
origin_graph |
Input |
Original graph whose weight needs to be updated. |
|
const_names |
Input |
Name array of the nodes whose weights need to be updated. |
|
weight_refreshable_graphs |
Output |
Graphs whose weights can be updated. This parameter is a structure and consists of three parts: weight initialization graph, weight update graph, and inference graph. For details, see the structure example below. |
1 2 3 4 5 |
struct WeightRefreshableGraphs { ge::Graph infer_graph; ge::Graph var_init_graph; ge::Graph var_update_graph; }; |
Returns
Example
For details about the call example, see Example.
Parent topic: aclgrph APIs