• Stars
    star
    305
  • Rank 133,768 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 4 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Go idiomatic binding to the C++ core of PyTorch

GoTorch

TravisCI codecov CircleCI GoDoc

GoTorch reimplements PyTorch high-level APIs, including modules and functionals, in idiomatic Go. Thus enables deep learning programming in Go and Go+. This project is in its very early stage.

Easy Switch

Writing deep learning systems in Go is as efficiently as in Python. The DCGAN training programs in GoTorch and PyTorch call similar APIs, have similar program structure, and have a similar number of lines. Go+ has a syntax similar to Python. The Go+ compiler translates Go+ programs into Go source programs. It is a joy to write Go+ programs that calls Go packages like GoTorch.

We have a plan of a translator that migrates existing PyTorch models in Python into GoTorch.

Benefits

  1. Higher runtime efficiency. Go programs run as efficiently as C++.

  2. Training and prediction in the same language. No longer training in Python and online prediction in C++. All in Go/Go+. No TensorFlow graphs or PyTorch tracing.

  3. Same data processing code for training and prediction. No need to Wrap OpenCV functions into TensorFlow operators in C++ for prediction and Python for training.

  4. Supports many machine learning paradigms., including adversarial, reinforcement, and imitation learning -- those we cannot split into training and prediction.

  5. Same program for edge and cloud. GoTorch programs compile and run on phones and self-driving cars as they do on servers and desktops.

The Tech Stack

GoTorch works with the following open-source communities to form Go+Torch.

  • the Go+ community,
  • the PyTorch community, and
  • the TensorFlow XLA ecosystem.

The following figure reveals the stack of technologies.

Go+ applications   # users write DL applications in Go+,
     β”‚             # whose syntax is as concise as Python
 [Go+ compiler]
     ↓
Go source code -β†’ GoTorch -β†’ libtorch -β†’ pytorch/xla -β†’ XLA ops
     β”‚
 [Go compiler]
     ↓
executable binary  # x86_64, ARM, CUDA, TPU
                   # Linux, macOS, Android, iOS

Documentation

More Repositories

1

mapreduce-lite

A C++ implementaton of MapReduce without distributed filesystem
C++
263
star
2

go-cpp

This project demonstrates how to let Go programs invoke statically linked C++ libraries without using SWIG.
C++
45
star
3

k8s-ml

42
star
4

huggingface-tokenizer-in-cxx

C++
34
star
5

graphviz-server

A Racket Web server and Ajax client to convert Graphviz source code embedded in HTML pages into PNG images.
Racket
24
star
6

paddle-code-browse

Shell
23
star
7

parallel

Some OpenMP like syntax for Go
Go
23
star
8

deeplearning

The Gritty Details of Deep Learning
Shell
20
star
9

learn-cuda

Cuda
20
star
10

risk_model

This is an tutorial on credit risk model designed for peer-to-peer lending (Internet finance)
TeX
19
star
11

hmm

A hidden Markov model implementation
Go
17
star
12

recordio

Go
11
star
13

markdown-renderer

An HTTP server that renders Markdown documents loaded from a downstream HTTP server. It can be used with Nginx as a rendering filter.
CSS
11
star
14

lua-vs-go

HTML
9
star
15

RussCoxAcmeTourSubtitle

Subtitle of Russ Cox's video tour of Acme.
9
star
16

ipynb

A Go package of Jupyter Notebook format
Go
7
star
17

ios-go-jsonrpc

Objective-C
7
star
18

goyaccfmt

Pretty format goyacc source code
Go
7
star
19

markdown-converter

A Racket module using FFI to load Discount and support Markdown text conversion.
Racket
6
star
20

phoenix-1

Go
5
star
21

fs

A Go package that can access files on local filesystem, HDFS and an in-memory filesystem designed for unit testing.
Go
5
star
22

code-review-what

C++
4
star
23

build-statically-linked-go-programs

Go
4
star
24

weakand

Go
4
star
25

prism

Prism is a RPC server for deploying and running distributed systems.
Go
3
star
26

cjk-tokenzier

A unigram CJK tokenizer
C++
3
star
27

hdfs

The Reader/Writer interface wrapping github.com/zyxar/hdfs
Go
3
star
28

gritty-details-latent-topic-modeling

TeX
3
star
29

google-libs

Blade BUILD files that refers to Google libraries installed on your MacOSX computers as //thirdparty
C++
3
star
30

ci

Go
3
star
31

chinese-whisper

Chinese Whisper is an interesting program introduced by Rob Pike. Here we have the program implemented in Go, Scheme and maybe other languages.
Racket
3
star
32

nan

`nan` rewrites your Go program to add panic checks for NaN. It can also remove these panic checks. Machine learning guys would love `nan`.
Go
2
star
33

jsonrpc

Go
2
star
34

mysql-server-in-docker

Connect from the host to MySQL server running in a Docker container
Shell
2
star
35

notes

Python
2
star
36

wangkuiyi.github.io

HTML
2
star
37

eisvogel-cjk

Pandoc template support CJK
2
star
38

swiftgo

A slide that compare Swift and Go, the two new programming languages
2
star
39

canonicalize-go-python-grpc-dev-env

Go
1
star
40

kubernetes

1
star
41

cudago

Go
1
star
42

fluid-try

An experimental, simplified re-implementation of PaddlePaddle Fluid in a more concise way
Python
1
star
43

cxxtorch

A demo using PyTorch C++ functional API
Go
1
star
44

delay-srt

delay-srt is a Racket (Scheme) program which increases/decreases the delay of an SRT subtitle file.
Racket
1
star
45

learn-calcite

Dockerfile
1
star
46

sqlfs

Go io.Write and io.Reader implementations that treats a MySQL table as a file
Go
1
star
47

mmdn

TeX
1
star
48

sqlflowserver

The gRPC proxy server of SQL engines
Go
1
star
49

gonet

Go CSP model over network
Go
1
star
50

pytorch-distributed-tutorials

Python
1
star
51

hevea-xelatex

Shows how to write Chinese document using LaTeX and generate HTML and PDF.
TeX
1
star
52

dockerize-devbox

Dockerfile
1
star
53

farm

Fast routines for the ARM processors
C++
1
star
54

avl

C
1
star
55

nn

Go
1
star
56

gocopycat

How if we want to change part of a Go package while keep the rest?
Go
1
star
57

sstable

1
star
58

mdfmt

Auto reformat Markdown files
Shell
1
star
59

repo

1
star