Loading repository data…
Loading repository data…
YJDoc2 / repository
A Neural Network implemented from scratch as per http://neuralnetworksanddeeplearning.com/ in Rust. This is then trained on MNIST. This is also used in Rust-NN-Web project to compile to WASM and recognize digits.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This project is contributed by : Yashodhan Joshi , Vatsal Soni, Yatharth Vyas & Tejas Ghone. Neural networks currently provide the best solutions to many problems in image recognition, speech recognition, and natural language processing etc. Here is an example of our effort of implementing the traditional Neural Network of Recognizing handwritten digits in Rust Programming Language. You can read more about it from here
This is also used with WASM to create a web digit recognizer , check that repository here.
Initially this started as a way of learning about NN and Rust as well, then we tried to test the speed of this against the python implementation of the same, and finally we used this to implement web digit predictor using Rust and WASM which predicts digits completely in frontend, see the github repository here.
As far as the speed go, we tested this and the python code from the website form which we implemented this, updating it for python3. Without we doing any manual optimizations, and using the optimizations that are by default in the libraries only in both Rust as well as Python code, we saw that the Production build of Rust would Run in 1 minute and some time for 30 epochs where as Python3 would take 6 minutes and some time for the same.
One might also check this blog where the person didn't find much difference between both code speed, but when we used code from his repository and compiled production build, that ran faster than ours , and finished almost withing 1 minute, which we think is because of using OpenBLAS in the Ndarray crate as well as using matrix for input instead of vectors optimization, which we haven't used in ours.
That said, In our opinion it may not be very practical to use Rust for direct interface of NN libraries, as a very well coded, tested, and widely used ones are available in Python. Instead maybe it would be very good option, seeing the promises Rust makes and given that it can work very well with other languages through bindings, to use it for the implementation of libraries that are used by Python code to gain speed, along with C or C++.
We have implemented two versions of the Neural Net whose code you can view in files c1 and c2 of the NN folder. We have used the MNIST data set for training and testing of our model. The Net has about 784 input + 10 output + 30 hidden which equals 824 neurons.