Skip to content

Commit 80d977e

Browse files
RobertLucianvishalbollu
authored andcommitted
Fix dynamic axes for ONNX models (#1187)
(cherry picked from commit 53c0b37)
1 parent 72b21dc commit 80d977e

File tree

1 file changed

+1
-2
lines changed
  • pkg/workloads/cortex/lib/client

1 file changed

+1
-2
lines changed

pkg/workloads/cortex/lib/client/onnx.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ def transform_to_numpy(input_pyobj, input_metadata, model_name):
111111

112112
try:
113113
for idx, dim in enumerate(target_shape):
114-
# dynamic_axes implies that a given dimension can have any size
115-
if type(dim) is str and "dynamic_axes" in dim:
114+
if type(dim) is str:
116115
target_shape[idx] = -1
117116
elif type(dim) is not int:
118117
target_shape[idx] = 1

0 commit comments

Comments
 (0)