Hi, I’m having the following problem which I can’t seem to resolve easily.

I have the following 2 tensors ‘values’ & ‘idx’ where:

```
values.shape = [2048,16,4]
idx.shape = [2048,16,1]
```

the elements in the tensor ‘idx’ are ranging from [0,1,2,3], and they indicate a specific elements in the corresponding place in the ‘values’ vector.

I wan’t to be able to separate the tensor ‘values’ according to the ‘idx’ tensor such that:

```
values_a.shape = [2048,16,1]
values_b.shape = [2048,16,3]
```

where the elements in ‘values_a’ are chosen according to the ‘idx’ tensor

and ‘values_b’ is chosen by the elements not indicated in the ‘idx’ tensor

I managed to get ‘values_a’ using gather function.

But couldn’t figure a way to get the other.

Any help please?

Thanks