Minimal library for creating neural networks.
npm package →
Nanoai is a fast, lightweight library for handling multi-layer perceptron (MLP) neural networks.
The addition of recurrent and convolutional layers is not planned at this time.
npm install @rbxts/nanoai
yarn add @rbxts/nanoai
pnpm add @rbxts/nanoai
Add littensy/nanoai
to your wally.toml
file.
[dependencies]
Nanoai = "littensy/nanoai@VERSION"
local model = Nanoai.create({ 2, 3, 1 }, Nanoai.Activation.TanH)
Nanoai.init.normal(model)
for _ = 1, 500 do
Nanoai.backpropagate(model, { 0, 1 }, { 1 }, 0.3)
Nanoai.backpropagate(model, { 1, 0 }, { 1 }, 0.3)
Nanoai.backpropagate(model, { 0, 0 }, { 0 }, 0.3)
Nanoai.backpropagate(model, { 1, 1 }, { 0 }, 0.3)
end
Nanoai.predict(model, { 0, 1 }) -- ~1
Nanoai is released under the MIT License.