# MLSession

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable, Not replicated
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/MLSession/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/MLSession

A machine-learning inference session that wraps a single loaded model and runs it through [`MLSession:ForwardAsync()`](https://rapi.sleaze.dev/classes/MLSession.md).

## Methods

### ForwardAsync

```luau
MLSession:ForwardAsync(data: { [string]: any }): { [string]: any }
```

- Tags: Yields, Capabilities: Basic

Runs the session's model on the given input and asynchronously returns the model's output.

Parameters:

- `data`: A dictionary mapping each of the model's input names to that input's tensor, given as a nested array of numbers matching the input's shape.

Returns: A dictionary mapping each of the model's output names to that output's tensor, given as a nested array of numbers matching the output's shape.

## Inherited members

- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
