Downsample tensor

333 Views Asked by At

I need to downsample a tensor by a factor 2, it is a 1-D tensor: enter image description here

I don't know how can I do it

2

There are 2 best solutions below

0
amur On

If you want to do it using interpolation, the easiest way to do it would be through average pooling. Learn more here.

0
Alberto On

What you are you are looking for is probably tf.squeeze(tensor), which removes the dimensions that are 1