Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorflow slicing

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?

like image 675
Gagaouthu Avatar asked Nov 08 '22 15:11

Gagaouthu


1 Answers

You can try the following:

data[:, :, 0:6]
like image 199
Green Falcon Avatar answered Nov 15 '22 08:11

Green Falcon