aigo is a Go library for building and training artificial intelligence models. It aims to provide a simple yet powerful API for creating neural networks, implementing training algorithms, and making predictions — all in pure Go.
Built with functional programming principles in mind, Aigo emphasizes immutability, pure functions, and composable operations for building ML pipelines.
Leveraging Go's explicit error handling, every operation returns clear errors, making debugging and maintenance straightforward.
Written in pure Go, Aigo compiles to native machine code, providing excellent performance without CGO overhead or external dependencies.
Test the Multi-Layer Perceptron model trained with Aigo. Draw a circle or a cross below and the AI will guess what you've drawn!
package main
import (
"fmt"
"github.com/eleby/aigo/MLP"
)
func main() {
var init MLP.Init
init.NumFeatures = 256
init.LayerSizes = []int{128, 64, 2}
init.LearningRate = 0.01
mlp, _ := MLP.CreateNetwork(init)
mlp.Train(inputs, targets, 1000)
predictions := mlp.Predict(tests)
}
Aigo is designed with a modular architecture that allows you to plug in custom layers, optimizers, and loss functions while providing sensible defaults for common use cases.