← all repositories
patrikeh/go-deep

A neural net in Go that knows its limits

A from-scratch feedforward implementation for when you need deep learning without the deep dependencies.

558 stars Go ML Frameworks
go-deep
Not currently ranked — collecting fresh signals.
star history

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 NewBatchTrainer with configurable workers
  • Bias nodes and configurable weight initialization (normal or uniform)
  • Toy and realistic examples in training/trainer_test.go and examples/ (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.

Frequently asked

What is patrikeh/go-deep?
A from-scratch feedforward implementation for when you need deep learning without the deep dependencies.
Is go-deep open source?
Yes — patrikeh/go-deep is open source, released under the MIT license.
What language is go-deep written in?
patrikeh/go-deep is primarily written in Go.
How popular is go-deep?
patrikeh/go-deep has 558 stars on GitHub.
Where can I find go-deep?
patrikeh/go-deep is on GitHub at https://github.com/patrikeh/go-deep.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.