A neural net in Go that knows its limits
A from-scratch feedforward implementation for when you need deep learning without the deep dependencies.

What it does
go-deep is a plain-Go feedforward neural network with backpropagation. It handles regression, binary, multi-class, and multi-label classification using sigmoid, tanh, or ReLU activations, with SGD, momentum, Nesterov, or Adam optimizers. Batch training runs in parallel across workers, but the author is explicit: no GPU support, so don’t reach for this at production scale.
The interesting bit
The API is deliberately old-school: you hand-craft layer sizes, pick an activation, and watch epoch-by-epoch error printouts. No Keras-style .fit() magic, no autodiff framework underneath — just neurons, synapses, and explicit weight initializers. The MNIST example hits ~97% accuracy with a single hidden layer of 50 neurons in 25 epochs, which is respectable for a zero-dependency implementation.
Key highlights
- Four classification modes with matched output activations and loss functions (regression/MSE, multi-class/softmax+CE, multi-label/sigmoid+CE, binary/sigmoid+binary CE)
- Parallel batch training via
NewBatchTrainerwith configurable workers - Bias nodes and configurable weight initialization (normal or uniform)
- Toy and realistic examples in
training/trainer_test.goandexamples/(wines, MNIST)
Caveats
- Author explicitly warns: “No GPU computations — don’t use this for any large scale applications”
- Only 557 stars and modest activity; this is a learning/educational tool, not a maintained framework
- No convolutional layers, RNNs, or modern architectures — strictly feedforward MLPs
Verdict
Worth a look if you’re teaching neural nets from scratch, need a tiny dependency tree, or want to hack on backprop without wrestling with CUDA. Everyone else should probably stick to Go bindings for TensorFlow or PyTorch, or use Go only for the serving layer.