Still got the same error.
By the way, it doesn’t seem to matter what x is. I used a random number generator, but you could replace x with x = torch.ones(5) or x = torch.ones(5, 5) and still get the same error.