Skip to content

Commit

Permalink
replaced zeros_like with zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-esir committed Jul 17, 2020
1 parent 1ce15d6 commit 9a65e3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model-optimizer/mo/utils/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def get_shape_after_slice(input_shape, slice_idx):
Calculate shape of a tensor after slicing without actually creating the resulting tensor.
Is introduced to save memory.
"""
output_shape = np.zeros_like(input_shape)
output_shape = np.zeros(input_shape.size)
for i, s in enumerate(slice_idx):
start, end = check_boundaries(input_shape[i], s.start, s.stop)
output_shape[i] = (end - start) / s.step
Expand Down

0 comments on commit 9a65e3a

Please sign in to comment.