Skip to content
Snippets Groups Projects
Commit a34819f4 authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

fix : typing includes in resize

Related to #50
parent ced2d31c
No related branches found
No related tags found
1 merge request!104feat : operator expand
......@@ -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[tuple[aidge_core.Node, int]], opset: int = None) -> aidge_core.Node:
def import_resize(onnx_node: onnx.NodeProto, input_nodes: List[Tuple[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: dict = {}
resize_attrs: Dict = {}
mode_dict: dict[str, aidge_core.Interpolation.Mode] = {
mode_dict: Dict[str, aidge_core.Interpolation.Mode] = {
'cubic': aidge_core.Interpolation.Mode.CUBIC,
'linear': aidge_core.Interpolation.Mode.LINEAR,
'floor': aidge_core.Interpolation.Mode.FLOOR,
......
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