Struct InferenceScopeHandle<T>
A disposable handle that restores the previous inference context when disposed. Returned by Begin(InferenceContext<T>) to enable proper scope nesting.
public readonly struct InferenceScopeHandle<T> : IDisposable
Type Parameters
TThe numeric type for tensor elements.
- Implements
- Inherited Members
Remarks
This struct should be used with a using statement to ensure the previous context is properly restored even if an exception occurs.
Methods
Dispose()
Restores the previous inference context.
public void Dispose()