Stop Gradient is an operation that passes a value forward unchanged but blocks gradients from flowing back during backpropagation
Autograd frameworks build a computation graph as you run the forward pass, recording how each tensor was produced
When backward is called the gradients flow along the recorded edges via the chain rule, stop_gradient cuts the edge