MLSession
A machine-learning inference session that wraps a single loaded model and runs it through MLSession:ForwardAsync().
This class is not replicated. Its interface does not cross the network boundary.
This class is not creatable. Instances of this class cannot be created with Instance.new.
| Memory category | Instances |
|---|
Member index 1
| History | Member | |
|---|---|---|
| 676 | ForwardAsync(data: Dictionary): Dictionary | |
| inherited from Object | ||
| 647 | ClassName: string | |
| 647 | className: string | |
| 647 | GetPropertyChangedSignal(property: string): RBXScriptSignal | |
| 647 | IsA(className: string): bool | |
| 650 | isA(className: string): bool | |
| 647 | Changed(property: string) | |
Description
An MLSession wraps a single loaded neural-network model and runs inference
on it. You don't construct a session directly; instead,
MLService:CreateSessionAsync() loads a model bundle for a given asset
and returns a ready-to-use session. Call
ForwardAsync() on that session to run the
model's forward pass on your input data and receive its output.
History 2
- 676 Add ForwardAsync
- 676 Add MLSession
Members 1
ForwardAsync
| Parameters (1) | ||
|---|---|---|
| data | Dictionary | |
| Returns (1) | ||
| Dictionary | ||
Runs inference for the session's loaded model.
If the model declares a dynamic output dimension, the call errors. Calling this method on a session with no valid loaded model also errors.
This function yields. It will block the calling thread until completion.
| Thread safety | Unsafe |
|---|
History 1
- 676 Add ForwardAsync