Packages
balanced_ternary_engine
0.1.0-dev
Convert neural network weights to balanced ternary and run them at runtime.
Current section
Files
Jump to
Current section
Files
guides/runtime.md
# Runtime Guide
```elixir
{:ok, rt} = BalancedTernaryEngine.Runtime.load("model.tbin", %{})
out = BalancedTernaryEngine.Runtime.forward(rt, input)
{out, rt} = BalancedTernaryEngine.Runtime.prefill(rt, input)
{out, rt} = BalancedTernaryEngine.Runtime.decode(rt, input)
```
Reset the cache with `BalancedTernaryEngine.Runtime.reset_cache/1`.