Skip to content

Commit 4a15692

Browse files
committed
fix a wrong check on torch version
1 parent 4aacd11 commit 4a15692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchpruner/model_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,6 @@ def replace_object_by_class(
180180

181181
def normalize_onnx_parameters(**kwargs):
182182
torch_version = torch.__version__.split(".")
183-
if torch_version[0] > "2" or len(torch_version) > 1 and torch_version[1] >= "10":
183+
if int(torch_version[0]) >= 2 or len(torch_version) > 1 and int(torch_version[1]) >= 10:
184184
kwargs.pop("_retain_param_name", None)
185185
return kwargs

0 commit comments

Comments
 (0)