Skip to content

GPU Javascript Library for Machine Learning

License

Notifications You must be signed in to change notification settings

abbottjlu/gbrain

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gbrain

April 2 2018

GPU Javascript Library for Machine Learning

The creation of this library comes after investigation and work about how avoid out to CPU when perform GPU neural network infference/training along every neural network layers.

I achieved a solution to this for using an Adjacency Matrix which allow know the relation easily on GPU. It's more used in real-time Graph systems GPU based but I can't saw any library using it over GPU neural networks.

Exist a limitation of 4096 neurons by the fact of use an Adjacency Matrix but through this system the leak to CPU is avoided on the middle layers and the CPU infference read is only performed in the last layer (out layer). On entire WebGL applications that may need a neural network system this technique would allow entire neural network execution over GPU.

At the same time batch is executed in the same way, allowing inyect at this moment until 7 direct experiences at the same time per tick for training or 7 direct infferences at the same time per tick and WebGL context.

The Reinforcement Learning class is practically the Karpathy's RL module (ConvNetJS) modified.

- Basic Linear Regression

- ConvNetJS Reinforcement Learning demo integration

- Reinforcement Learning + convolution

- MNIST Classification

How it works

We not need element-wise matrixs and send information to CPU on every layer result.

On backpropagation the weight data is updated over the Adjacency Matrix

Activation function is included inside own neuron, avoiding to have propagate it to any reluctance layer and so we gain better performance.

At this moment only leaky-relu activation function is implemented.

I have been able to learn about this algorithm especially by the Andrew NG Machine Learning course, Karpathy's ConvNetJS, the Matt Mazur paper, Prakash Jay tutorial, Miguel Ángel Lobato & users that shared information on internet. Thanks.

About

GPU Javascript Library for Machine Learning

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%