Skip to content
Snippets Groups Projects
Commit fd956788 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Add support for export ofoperator Sub.

parent 628b99f1
No related branches found
No related tags found
2 merge requests!152Update Aidge export to take a graph view has an argument instead of a...,!115Aidge export
Pipeline #45888 passed
from aidge_core.aidge_export_aidge.utils import operator_register, parse_node_input
from aidge_core import ExportNode, generate_str
from aidge_core.aidge_export_aidge import ROOT_EXPORT
from pathlib import Path
@operator_register("Sub")
class Sub(ExportNode):
def __init__(self, node):
super().__init__(node)
def export(self, export_folder:Path, list_configs:list):
return list_configs
def forward(self, list_actions:list):
list_actions.append(generate_str(
ROOT_EXPORT / "templates/graph_ctor/sub.jinja",
name=self.name,
inputs=parse_node_input(self.node.inputs()),
**self.attributes
))
return list_actions
{% filter indent(width=4, first=False) %}
/*** {{name|upper}} ***/
std::shared_ptr<Aidge::Node> {{name}} =
Aidge::Sub(
"{{name}}"
);
{% include "./_set_input.jinja" %}
graph->add({{name}});
{% endfilter %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment