TraceSession manages tensor references during computation graph tracing. It provides methods to convert tensors to TensorRef objects for graph capture.
Clear all cached tensor references. Call between training batches to prevent memory accumulation from intermediate tensors. Tensors will be re-registered on the next forward pass.