gorgonia /gorgonia

Gorgonia is a library that helps facilitate machine learning in Go.

★ 5,927⑂ 450👁 179⑃ 296● 283▤ 29
GoApache-2.0Created 2016-09-14gorgonia.org/
Download: v0.9.18v0.9.18 ↓0.9.182023-12-03
+0
Daily
5,927
stars
450
forks
179
watchers
296
prs
283
issues
29
releases

README

!Logo

  
!Build and Tests

 



Gorgonia is a library that helps facilitate machine learning in Go. Write and evaluate mathematical equations involving multidimensional arrays easily. If this sounds like Theano or TensorFlow, it's because the idea is quite similar. Specifically, the library is pretty low-level, like Theano, but has higher goals like Tensorflow.

Gorgonia:

 Can perform automatic differentiation
 Can perform symbolic differentiation
 Can perform gradient descent optimizations
 Can perform numerical stabilization
 Provides a number of convenience functions to help create neural networks
 Is fairly quick (comparable to Theano and TensorFlow speed)
 Supports CUDA/GPGPU computation (OpenCL not yet supported, send a pull request)
 Will support distributed computing

 Goals 

The primary goal for Gorgonia is to be a highly performant machine learning/graph computation-based library that can scale across multiple machines. It should bring the appeal of Go (simple compilation and deployment process) to the ML world. It's a long way from there currently, however, the baby steps are already there.

The secondary goal for Gorgonia is to provide a platform for the exploration of non-standard deep-learning and neural network-related things. This includes things like neo-hebbian learning, corner-cutting algorithms, evolutionary algorithms, and the like.

 Why Use Gorgonia? 

The main reason to use Gorgonia is developer comfort. If you're using a Go stack extensively, now you have access to the ability to create production-ready machine learning systems in an environment that you are already familiar with and comfortable with.

ML/AI at large is usually split into two stages: the experimental stage where one builds various models, tests, and retests; and the deployed state where a model after being tested and played with, is deployed. This necessitates different roles like data scientist and data engineer.

Typically the two phases have different tools: Python (PyTorch, etc) is commonly used for the experimental stage, and then the model is rewritten in some more performant language like C++ (using dlib, mlpack etc). Of course, nowadays the gap is closing and people frequently share the tools between them. Tensorflow is one such tool that bridges the gap.

Gorgonia aims to do the same but for the Go environment. Gorgonia is currently fairly performant - its speeds are comparable to PyTorch's and Tensorflow's  CPU implementations. GPU implementations are a bit finicky to compare due to the heavy CGO tax, but rest assured that this is an area of active improvement.

 Getting started

 Installation 

The package is go-gettable: go get -u gorgonia.org/gorgonia.

Gorgonia is compatible with Go modules.

 Documentation

Up-to-date documentation, references, and tutorials are present on the official Gorgonia website at https://gorgonia.org.

 Keeping Updated

Gorgonia's project has a Slack channel on gopherslack, as well as a Twitter account. Official

Top issues

Discussions

Latest release

v0.9.18 v0.9.18 2023-12-03
Possibly last release of the 0.9 branch before  the huge changes coming from v0.10.0

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON