>torch.Tensor(10).random_(0,10) #works >torch.Tensor(10).random_(0,10).cuda() #works >torch.Tensor(10).cuda().random_(0,10) #does not work