Reputation: 277
Let T
be a tensor of shape [n,f]
, which represents a batch. Now I want to slice T
into m
tensors along axis=0
. The value of m
depends on the current batch. I have another tensor I
of shape [m,2]
which stores pairs of indices which indicate where the slices should occur.
I am not really sure how to "iterate" over the indices to apply tf.slice
. Any ideas?
Can this somehow be achieved using tf.scan
?
Upvotes: 0
Views: 976