Creating a tensor of ordered integers of shape (None, 1)

Viewed 251

Given an input batch of size (None, 1), is it possible to create a tensor of ordered integers that is the same shape?

ex:

input = [3, 2, 3, 7], output = [0, 1, 2, 3]

ex:

input = [9, 3, 12, 4, 34 .....], output = [0, 1, 2, 3, ....]
2 Answers
Related