In the following code, I see, requires_grade is  False for a**2 but True for a even after using torch.no_grad(). Why is a.requires_grad is still True?
print(a.requires_grad)
print((a**2).requires_grad)
with torch.no_grad():
  print(a.requires_grad)
  print((a**2).requires_grad)

Output:
True
True
True
False