Since you would like to interpolate the two last dimensions, you would have to treat the input as a spatial input which is expected to have 4 dimensions.
You could temporarily unsqueeze the batch dimension, apply the interpolation, and squeeze it afterwards.
Since you’ve mentioned “label tensor” I assume you are working with LongTensors and are thus interested in the mode="nearest" interpolation. If so, this should work:
x = torch.randint(0, 10, (2, 3, 3))
y = F.interpolate(x.unsqueeze(0).float(), size=(5, 5), mode='nearest').squeeze(0).long()
print(y.shape)
> torch.Size([2, 5, 5])