Skip to content

Commit

Permalink
feedback from the code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Jirmasek committed Oct 4, 2024
1 parent 46f51a8 commit 6780c1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coremltools/converters/mil/frontend/torch/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -2384,7 +2384,7 @@ def _parse_positional_args(context, node) -> Tuple[Var]:
# However, CoreML does not allow such empty tensor, so remove them now
if np.any([is_tensor_empty(x) for x in xs]):
filtered_xs = [x for x in xs if not is_tensor_empty(x)]
xs = filtered_xs if filtered_xs else [xs[0]]
xs = filtered_xs if len(filtered_xs) > 0 else [xs[0]]

dim = inputs[1] if nargs > 1 else 0

Expand Down

0 comments on commit 6780c1f

Please sign in to comment.