When we don't need a tensor to be traced for the gradient computation, we detach the tensor from the current computational graph. It returns a new tensor that doesn't require a gradient.