I am trying to append some more data points to my batch but I can’t get it to work.
I have one tensor of [64, 40] and the other a [64, 10].
Whenever I do torch.cat or torch.stack it gives me a dimension error.
Anyone know how to append the latter [64, 10] to the [64, 40] tensor?
b = torch.rand(64, 10)
a = torch.rand(64, 40)
torch.cat([a, b], dim=1) # shape is torch.Size([64, 50])
you can have more details in these posts:
Nice it worked. Thank you.