There are a number of cases in which the grader uses an older version of Torch. So you just have to find instances of the more advanced APIs that you are using and downgrade them.
Here’s another thread with a different example of this issue from GANs C1. And here’s one involving torch.square
.