Assuming train_y is a numpy array of type float, this should do what you want
train_y = Torch.tensor(train_y).cuda()

If you need to force train_y to be of type float you can do this
train_y = Torch.tensor(train_y).float().cuda()