Solved by ptrblck in post #2 
              
              
                F.interpolate applies the interpolation in the temporal/spatial/volumetric dimensions. 
In your case it would accept a single value: 
x = torch.randn(8, 28, 161)
out = F.interpolate(x, size=140)
print(out.shape)
> torch.Size([8, 28, 140])

Since you want to interpolate in the channel dimension, you …