Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_onnx
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_onnx
Commits
f54ee318
Commit
f54ee318
authored
1 year ago
by
Grégoire Kubler
Committed by
Cyril Moineau
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix : inverted conditions on onnx2aidge_name
parent
e6fdc573
No related branches found
No related tags found
2 merge requests
!39
0.2.1
,
!33
feat/script_compare_layers_aidge_onnx
Pipeline
#43891
passed
11 months ago
Stage: static_analysis
Stage: build
Stage: test
Stage: coverage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aidge_onnx/utils.py
+2
-2
2 additions, 2 deletions
aidge_onnx/utils.py
with
2 additions
and
2 deletions
aidge_onnx/utils.py
+
2
−
2
View file @
f54ee318
...
@@ -18,6 +18,7 @@ _MAP_NP_ONNX_TYPE = {
...
@@ -18,6 +18,7 @@ _MAP_NP_ONNX_TYPE = {
}
}
_MAP_ONNX_NP_TYPE
=
{
v
:
k
for
k
,
v
in
_MAP_NP_ONNX_TYPE
.
items
()}
_MAP_ONNX_NP_TYPE
=
{
v
:
k
for
k
,
v
in
_MAP_NP_ONNX_TYPE
.
items
()}
def
onnx_to_aidge_model_names
(
model
:
onnx
.
ModelProto
):
def
onnx_to_aidge_model_names
(
model
:
onnx
.
ModelProto
):
"""
"""
Change the name of each node of the model from onnx convention to aidge
'
s one
Change the name of each node of the model from onnx convention to aidge
'
s one
...
@@ -63,6 +64,5 @@ def onnx_to_aidge_name(name: str) -> str:
...
@@ -63,6 +64,5 @@ def onnx_to_aidge_name(name: str) -> str:
Translates onnx node naming convention to aidge naming convention
Translates onnx node naming convention to aidge naming convention
"""
"""
name
=
name
.
replace
(
"
/
"
,
"
_
"
).
replace
(
"
.
"
,
"
_
"
)
name
=
name
.
replace
(
"
/
"
,
"
_
"
).
replace
(
"
.
"
,
"
_
"
)
name
=
name
if
len
(
name
)
>
0
and
name
[
0
].
isdigit
()
else
"
data_
"
+
name
name
=
name
if
(
len
(
name
)
==
0
or
not
name
[
0
].
isdigit
()
)
else
"
data_
"
+
name
return
name
return
name
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