The constructors have long been deprecated. Don’t use them anymore!
torch.tensor will do what you want. And if you want the equivalent of torch.Tensor(8), you could use the far better named torch.empty(8) instead.
Best regards
Thomas