I’m not sure why you are trying to Construct a LongTensor from a FloatTensor (we do not support this in the constructor).
Instead, a much simpler and equivalent way:
a = Variable(torch.rand(2, 3).long())