Skip to content

Commit

Permalink
fix logic2
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanfz98 committed Jan 16, 2022
1 parent 962fa36 commit c5742ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/tvm/relay/frontend/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -3806,7 +3806,7 @@ def _impl_v10(cls, inputs, attr, params):
# requirements.
def try_resolve_to_const(x, dtype_override=None, allow1D=False):
x2 = try_resolve_var_to_const(x, params)
x3 = ensure_scalar_shape(x2, force_assert=allow1D)
x3 = ensure_scalar_shape(x2, force_assert=not allow1D)
x_dtype = infer_type(x).checked_type.dtype
if (dtype_override is not None) and (dtype_override != x_dtype):
x4 = _op.cast(x3, dtype_override)
Expand Down

0 comments on commit c5742ad

Please sign in to comment.