_ContextMethodMixin.mark_dirty(*args)[source]
This should be called at most once, only from inside the forward() method, and all arguments should be inputs.
Every tensor that’s been modified in-place in a call to forward() should be given to this function, to ensure correctness of our checks. It doesn’t matter whether the function is called before or after modification.