I need to downsample a tensor by a factor 2, it is a 1-D tensor:
I don't know how can I do it
If you want to do it using interpolation, the easiest way to do it would be through average pooling. Learn more here.
What you are you are looking for is probably tf.squeeze(tensor), which removes the dimensions that are 1
tf.squeeze(tensor)