message: removed print statments
diff: @@ -1424,68 +1424,56 @@ class GetItemNode(FunctionNode):
  new_size = slice_elem.stop - start
  return new_size < old_size
  - def is_element(slice_elem):
  + def is_single_element(slice_elem):
  return type(slice_elem) == int
  shape = tensor.dims
  - print('shape', shape)
  - print('slices', slices)
  - # Match dimensions from right to left
  - new_shape = [] # append then reverse
  - j = len(shape) - 1
  - new_size = None
  - curr_tensor = copy.copy(tensor) #shallow copy since I'm not sure if I can change input tensor
  -
  - # In there are less slices than input dimensions, add 'colon' slices until num slices matches dimension
  + # Fewer slices than input dimensions
  diff = len(shape) - len(slices)
  if diff > 0:
  slices_lst = list(slices)
  for i in range(diff):
  slices_lst.append(slice(None, None, None))
  slices = tuple(slices_lst)
  - #print('slices_new', slices)
  +
  + # Match dimensions from right to left
  + new_shape = [] # append then reverse
  + j = len(shape) - 1
  + curr_tensor = copy.copy(tensor)
  for slice_elem in reversed(slices):
  if is_colon(slice_elem):
  - #print('colon')
  assert j >= 0
  new_shape.append(shape[j])
  j -= 1
  elif is_unsqueeze(slice_elem):
  - #print('unsqueeze')
  new_shape.append(1)
  - elif is_element(slice_elem):
  - #print('elem')
  + elif is_single_element(slice_elem):
  assert j >= 0
  splits = [1, shape[j] - 1]
  - print('splits', splits)
  curr_tensor = ffmodel.split(input=curr_tensor, sizes=splits, axis=j, name=name)[0]
  new_shape.append(1)
  j -= 1
  elif is_truncate(slice_elem, shape[j]):
  - #print('resize')
  assert j >= 0
  start = 0 if slice_elem.start == None else slice_elem.start
  splits = []
  - if start != 0: splits.append(start) # left split
  - splits.append(slice_elem.stop - start) # main split
  - if slice_elem.stop < shape[j]: splits.append(shape[j] - slice_elem.stop) # right_split
  - print('splits', splits)
  - curr_tensor = ffmodel.split(input=curr_tensor, sizes=splits, axis=j, name=name)[0] #split tensor in current dimension (j)
  + # create splits
  + if start != 0:
  + splits.append(start) # truncation from left
  + splits.append(slice_elem.stop - start)
  + if slice_elem.stop < shape[j]:
  + splits.append(shape[j] - slice_elem.stop) # truncation from right
  + curr_tensor = ffmodel.split(input=curr_tensor, sizes=splits, axis=j, name=name)[0]
  new_shape.append(slice_elem.stop - start)
  j -= 1
  else:
  assert 0, f"Unsupported slice element: {slice_elem}"
  new_shape.reverse()
  - print('new_shape', new_shape)
  -
  - #print('curr', curr_tensor.dims)
  return ffmodel.reshape(input=curr_tensor, shape=new_shape, name=name,)
  -
  -
  @staticmethod
  def strings_to_slices(strings: List[str]):
  # Extract slice elements
  