RuntimeError: element 0 of variables does not require grad and does not have a grad_fn

None of them seem to have a grad_fn.
Did you create these tensors with requires_grad=True?