Skip to content

Commit 55f9916

Browse files
committed
Update TensorFlow shape inference
1 parent 9f821e4 commit 55f9916

File tree

1 file changed

+3
-7
lines changed
  • pkg/workloads/cortex/tf_api

1 file changed

+3
-7
lines changed

pkg/workloads/cortex/tf_api/api.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,9 @@ def create_raw_prediction_request(sample):
159159
prediction_request.model_spec.signature_name = signature_key
160160

161161
for column_name, value in sample.items():
162-
163-
if util.is_list(value):
164-
shape = [len(value)]
165-
for dim in signature_def[signature_key]["inputs"][column_name]["tensorShape"]["dim"]:
166-
shape.append(int(dim["size"]))
167-
else:
168-
shape = [1]
162+
shape = []
163+
for dim in signature_def[signature_key]["inputs"][column_name]["tensorShape"]["dim"]:
164+
shape.append(int(dim["size"]))
169165

170166
sig_type = signature_def[signature_key]["inputs"][column_name]["dtype"]
171167

0 commit comments

Comments
 (0)