Hi @albanD and @Abdelpakey,
I am relatively new to PyTorch and deep learning in general and was wondering what are these 2 pieces of code that @albanD had is doing?
A.requires_grad_()   # what is this doing?
out = my_nullspace(A)

out.sum().backward()   # what is this doing?
print("A.grad", A.grad)

Would really appreciate if you could help. Many thanks in advance!