Tensorflow slicing

Viewed 516

I try slicing a tensor using the tf.Tensor.getitem function as below:

indices = [0, 5]
data[:,:,indices]

But I get the following error:

TypeError: can only concatenate list (not "int") to list.

Is there something I am doing wrong?

1 Answers

You can try the following:

data[:, :, 0:6]
Related