Skip to content

Commit

Permalink
fix the scalar shape check (#1223)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkChin08 authored Sep 8, 2022
1 parent ddeb9f5 commit d625648
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions neural_compressor/adaptor/tf_utils/graph_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ def _inference(self, model):
# sometimes the input_tensor is not the same order with inputs
# we should check and pair them
def check_shape(tensor, data):
# scalar default True
if tensor.shape == None:
return True
tensor_shape = tuple(tensor.shape)
data_shape = tuple(data.shape)
for tensor_dim, data_dim in zip(tensor_shape, data_shape):
Expand Down

0 comments on commit d625648

Please sign in to comment.