I tied the fallowing code in torch1.9 and I can see no error

output = torch.randn(4,4,256,256) # tensor size : (4,4,256,256)

target = torch.randn(4,4,256,192)

target = nn.functional.interpolate(target, (output.size()[2], output.size()[3]), mode="nearest")

print(target.shape)


Output>>> torch.Size([4, 4, 256, 256])
And I don’t know how you expect that target size has to be a tensor with 4 channels.
You can see in dataset definition that hm_shape 1 has only 3 channels.