Table of Contents

Struct InferenceScopeHandle<T>

Namespace
AiDotNet.Memory
Assembly
AiDotNet.dll

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

T

The 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()