Skip to content

Commit ef01049

Browse files
committed
Fix CI.
Fix tests.
1 parent 120de1a commit ef01049

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

onnx2pytorch/convert/attribute.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ def extract_attributes(node):
8787
kwargs["weight_multiplier"] = extract_attr_values(attr)
8888
elif attr.name == "auto_pad":
8989
value = extract_attr_values(attr)
90-
if value in ("NOTSET", "VALID", "SAME_UPPER", "SAME_LOWER"):
90+
if value == "NOTSET":
91+
# NOTSET means explicit padding is used, don't add to kwargs
92+
pass
93+
elif value in ("VALID", "SAME_UPPER", "SAME_LOWER"):
9194
kwargs["auto_pad"] = value
9295
else:
9396
raise NotImplementedError(

tests/onnx2pytorch/operations/test_cast.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import numpy as np
22
import torch
33
import pytest
4-
from onnx.mapping import TENSOR_TYPE_TO_NP_TYPE
54

65
from onnx2pytorch.operations import Cast
76

0 commit comments

Comments
 (0)