Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_export_cpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Eclipse Projects
aidge
aidge_export_cpp
Commits
56be9489
Commit
56be9489
authored
1 month ago
by
Axel Farrugia
Browse files
Options
Downloads
Patches
Plain Diff
[Refactor] node.ignore is now a flag instead of a required attribute
parent
7a53d26d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aidge_export_cpp/export_utils.py
+0
-1
0 additions, 1 deletion
aidge_export_cpp/export_utils.py
aidge_export_cpp/operators/Producer.py
+1
-9
1 addition, 9 deletions
aidge_export_cpp/operators/Producer.py
with
1 addition
and
10 deletions
aidge_export_cpp/export_utils.py
+
0
−
1
View file @
56be9489
...
@@ -167,7 +167,6 @@ def exclude_unwanted_producers(model):
...
@@ -167,7 +167,6 @@ def exclude_unwanted_producers(model):
nodes_to_ignore
=
[
"
Mul
"
,
"
BitShift
"
]
nodes_to_ignore
=
[
"
Mul
"
,
"
BitShift
"
]
for
node
in
model
.
get_nodes
():
for
node
in
model
.
get_nodes
():
node
.
attributes
().
ignore
=
False
if
node
.
type
()
==
"
Producer
"
:
if
node
.
type
()
==
"
Producer
"
:
children_nodes
=
[
n
.
type
()
for
n
in
node
.
get_children
()]
children_nodes
=
[
n
.
type
()
for
n
in
node
.
get_children
()]
for
node_type
in
nodes_to_ignore
:
for
node_type
in
nodes_to_ignore
:
...
...
This diff is collapsed.
Click to expand it.
aidge_export_cpp/operators/Producer.py
+
1
−
9
View file @
56be9489
...
@@ -47,15 +47,7 @@ class ProducerCPP(ExportNode):
...
@@ -47,15 +47,7 @@ class ProducerCPP(ExportNode):
def
__init__
(
self
,
node
,
mem_info
):
def
__init__
(
self
,
node
,
mem_info
):
super
().
__init__
(
node
,
mem_info
)
super
().
__init__
(
node
,
mem_info
)
self
.
values
=
np
.
array
(
self
.
operator
.
get_output
(
0
))
self
.
values
=
np
.
array
(
self
.
operator
.
get_output
(
0
))
if
node
.
attributes
().
has_attr
(
"
ignore
"
):
self
.
ignore
=
node
.
attributes
().
has_attr
(
"
ignore
"
)
self
.
ignore
=
node
.
attributes
().
ignore
else
:
self
.
ignore
=
False
if
node
.
attributes
().
has_attr
(
"
ignore
"
):
self
.
ignore
=
node
.
attributes
().
ignore
else
:
self
.
ignore
=
False
if
len
(
self
.
values
.
shape
)
==
4
:
# Note: export in HWC
if
len
(
self
.
values
.
shape
)
==
4
:
# Note: export in HWC
self
.
values
=
np
.
transpose
(
self
.
values
,
(
0
,
2
,
3
,
1
))
self
.
values
=
np
.
transpose
(
self
.
values
,
(
0
,
2
,
3
,
1
))
...
...
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