We've cleared quite a lot of Minerva's dependencies and made it easier to build. Basically, almost all needed are:
./build.sh
Please see the wiki page for more information.
Minerva is a fast and flexible tool for deep learning. It provides NDarray programming interface, just like Numpy. Python bindings and C++ bindings are both available. The resulting code can be run on CPU or GPU. Multi-GPU support is very easy. Please refer to the examples to see how multi-GPU setting is used.Minerva is a fast and flexible tool for deep learning. It provides NDarray programming interface, just like Numpy. Python bindings and C++ bindings are both available. The resulting code can be run on CPU or GPU. Multi-GPU support is very easy. Please refer to the examples to see how multi-GPU setting is used.
After building and installing Minerva and Owl package (python binding) as in Install Minerva. Try run ./run_owl_shell.sh
in Minerva's root directory. And enter:
>>> x = owl.ones([10, 5])
>>> y = owl.ones([10, 5])
>>> z = x + y
>>> z.to_numpy()
The result will be a 10x5 array filled by value 2. Minerva supports many numpy
style ndarray operations. Please see the API document for more information.
N-D array programming interface and easy integration with numpy
>>> import numpy as np
>>> x = np.array([1, 2, 3])
>>> y = owl.from_numpy(x)
>>> y += 1
>>> y.to_numpy()
array([ 2., 3., 4., ], dtype=float32)
More is in the API cheatsheet
Automatically parallel execution
>>> x = owl.zeros([256, 128])
>>> y = owl.randn([1024, 32], 0.0, 0.01)
The above x
and y
will be executed concurrently. How is this achieved?
Multi-GPU, multi-CPU support:
>>> owl.set_device(gpu0)
>>> x = owl.zeros([256, 128])
>>> owl.set_device(gpu1)
>>> y = owl.randn([1024, 32], 0.0, 0.01)
The above x
and y
will be executed on two cards simultaneously. How is this achieved?
We will keep updating the latest performance we could achieve in this section.
Training speed (images/second) |
AlexNet | VGGNet | GoogLeNet |
---|---|---|---|
1 card | 189.63 | 14.37 | 82.47 |
2 cards | 371.01 | 29.58 | 160.53 |
4 cards | 632.09 | 50.26 | 309.27 |
We also provide some end-to-end training codes in owl
package, which could load Caffe's model file and perform training. Note that, Minerva is not the same tool as Caffe. We are not focusing on this part of logic. In fact, we implement these just to play with the Minerva's powerful and flexible programming interface (we could implement a Caffe-like network trainer in around 700~800 lines of python codes). Here is the training error with time compared with Caffe. Note that Minerva could finish GoogleNet training in less than four days with four GPU cards.
We trained several models using Minerva from scratch to show the correctness. The following table shows the error rate of different network under different testing settings.
Testing error rate | AlexNet | VGGNet | GoogLeNet |
---|---|---|---|
single view top-1 | 41.6% | 31.6% | 32.7% |
multi view top-1 | 39.7% | 30.1% | 31.3% |
single view top-5 | 18.8% | 11.4% | 11.8% |
multi view top-5 | 17.5% | 10.8% | 11.0% |
The models can be found in the following link: AlexNet GoogLeNet VGGNet
You can download the trained models and try them on your own machine using net_tester script.
Minerva is provided in the Apache V2 open source license.
You can use the "issues" tab in github to report bugs. For non-bug issues, please send up an email at minerva-support@googlegroups.com. You can subscribe to the discussion group: https://groups.google.com/forum/#!forum/minerva-support.
For more information on how to install, use or contribute to Minerva, please visit our wiki page: https://github.com/minerva-developers/minerva/wiki