Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cyril Moineau
aidge_core
Commits
5b97a6a5
Commit
5b97a6a5
authored
1 year ago
by
Maxence Naud
Browse files
Options
Downloads
Patches
Plain Diff
[Upd] replace() python binding
parent
7299fadf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_binding/graph/pybind_GraphView.cpp
+12
-10
12 additions, 10 deletions
python_binding/graph/pybind_GraphView.cpp
with
12 additions
and
10 deletions
python_binding/graph/pybind_GraphView.cpp
+
12
−
10
View file @
5b97a6a5
...
...
@@ -26,7 +26,7 @@ void init_GraphView(py::module& m) {
.
def
(
"save"
,
&
GraphView
::
save
,
py
::
arg
(
"path"
),
py
::
arg
(
"verbose"
)
=
false
,
R"mydelimiter(
Save the GraphView as a Mermaid graph in a .md file at the specified location.
:param path: save location
:type path: str
)mydelimiter"
)
...
...
@@ -34,14 +34,14 @@ void init_GraphView(py::module& m) {
.
def
(
"get_output_nodes"
,
&
GraphView
::
outputNodes
,
R"mydelimiter(
Get set of output Nodes.
:rtype: list[Node]
)mydelimiter"
)
.
def
(
"get_input_nodes"
,
&
GraphView
::
inputNodes
,
R"mydelimiter(
Get set of input Nodes.
:rtype: list[Node]
)mydelimiter"
)
...
...
@@ -49,7 +49,7 @@ void init_GraphView(py::module& m) {
py
::
arg
(
"other_node"
),
py
::
arg
(
"include_learnable_parameters"
)
=
true
,
R"mydelimiter(
Include a Node to the current GraphView object.
:param other_node: Node to add
:type oth_Node: Node
:param includeLearnableParameter: include non-data inputs, like weights and biases. Default True.
...
...
@@ -66,18 +66,20 @@ void init_GraphView(py::module& m) {
py
::
arg
(
"fromTensor"
)
=
0U
,
py
::
arg
(
"toTensor"
)
=
gk_IODefaultIndex
,
R"mydelimiter(
Include a Node to the current GraphView object.
:param other_node: Node to add
:type oth_Node: Node
:param includeLearnableParameter: include non-data inputs, like weights and biases. Default True.
:type includeLearnableParameter
)mydelimiter"
)
.
def
(
"replace
_with
"
,
&
GraphView
::
replace
With
,
py
::
arg
(
"new_nodes"
),
.
def
_static
(
"replace"
,
&
GraphView
::
replace
,
py
::
args
(
"old_nodes"
)
,
py
::
arg
(
"new_nodes"
),
R"mydelimiter(
Replace the current GraphView with the set of given Nodes if possible.
:param new_nodes: Nodes with connections already taken care of.
Replace the old set of Nodes with the new set of given Nodes if possible in every GraphView.
:param old_nodes: Nodes actually connected in GraphViews.
:type old_nodes: Node
:param new_nodes: Nodes with inner connections already taken care of.
:type new_nodes: Node
:return: Whether any replacement has been made.
:rtype: bool
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment