What do the dimensions represent?
The posted shape should work with your code:
x = torch.randn([1, 32, 86])
y = F.interpolate(x, size=[1024], mode='nearest', align_corners=None)
print(y.shape)
> torch.Size([1, 32, 1024])

So I’m currently unsure where this error is raised.