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
a34819f4
Commit
a34819f4
authored
4 months ago
by
Grégoire Kubler
Browse files
Options
Downloads
Patches
Plain Diff
fix : typing includes in resize
Related to
#50
parent
ced2d31c
No related branches found
Branches containing commit
No related tags found
1 merge request
!104
feat : operator expand
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aidge_onnx/node_import/onnx_converters/resize.py
+5
-4
5 additions, 4 deletions
aidge_onnx/node_import/onnx_converters/resize.py
with
5 additions
and
4 deletions
aidge_onnx/node_import/onnx_converters/resize.py
+
5
−
4
View file @
a34819f4
...
...
@@ -8,7 +8,6 @@ http://www.eclipse.org/legal/epl-2.0.
SPDX-License-Identifier: EPL-2.0
"""
from
typing
import
List
import
numpy
as
np
import
aidge_core
import
onnx
...
...
@@ -18,8 +17,10 @@ from aidge_onnx.utils import get_node_attributes
from
aidge_core
import
Log
from
typing
import
Dict
,
Tuple
@auto_register_import
(
"
resize
"
)
def
import_resize
(
onnx_node
:
onnx
.
NodeProto
,
input_nodes
:
List
[
t
uple
[
aidge_core
.
Node
,
int
]],
opset
:
int
=
None
)
->
aidge_core
.
Node
:
def
import_resize
(
onnx_node
:
onnx
.
NodeProto
,
input_nodes
:
List
[
T
uple
[
aidge_core
.
Node
,
int
]],
opset
:
int
=
None
)
->
aidge_core
.
Node
:
"""
:param onnx_node: ONNX node to convert
:type onnx_node: onnx.NodeProto
...
...
@@ -31,9 +32,9 @@ def import_resize(onnx_node: onnx.NodeProto, input_nodes: List[tuple[aidge_core.
node_name
=
onnx_node
.
name
if
onnx_node
.
name
else
onnx_node
.
output
[
0
]
onnx_attrs
=
get_node_attributes
(
onnx_node
,
opset
)
resize_attrs
:
d
ict
=
{}
resize_attrs
:
D
ict
=
{}
mode_dict
:
d
ict
[
str
,
aidge_core
.
Interpolation
.
Mode
]
=
{
mode_dict
:
D
ict
[
str
,
aidge_core
.
Interpolation
.
Mode
]
=
{
'
cubic
'
:
aidge_core
.
Interpolation
.
Mode
.
CUBIC
,
'
linear
'
:
aidge_core
.
Interpolation
.
Mode
.
LINEAR
,
'
floor
'
:
aidge_core
.
Interpolation
.
Mode
.
FLOOR
,
...
...
This diff is collapsed.
Click to expand it.
Grégoire Kubler
@gregkub
mentioned in issue
#50
·
4 months ago
mentioned in issue
#50
mentioned in issue #50
Toggle commit list
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