Attend the Women in ML Symposium on December 7 Register now


Stay organized with collections Save and categorize content based on your preferences.

Slice a composite tensor along axis from 0 to end.


slice_to(tensor, 2, -1) === tensor[:, :, :-1]
sparse_to_dense(slice_to(sparse_tensor, 2, -1))
  === sparse_to_dense(sparse_tensor)[:, :, :-1]

tensor A Tensor or SparseTensor.
axis A python integer.
end A 0D scalar.

The sliced composite tensor.