That was the issue @nateanl , i added
tensor2 = torch.cat([torch.zeros([x.shape[0], 1],dtype=torch.int32).to('cuda')], dim=1)
y = torch.cat((y, tensor2), dim=1)
to the forward method the make the y tensor lengths longer by 1 and it’s working now. Thank you all for your help.