Hi,
This error happens because what you call .backward() on does not require gradients.
You want to make sure you did not changed the model not to require gradients or detached the output.
Also you can properly format your code using triple backticks:
```python
# Your code
```