A Neural Network Toolkit.
- Dynamic and incremental graph construction
- On-demand memory allocation
- Automatic minibatch broadcasting
- Mostly device-independent
- Simple usage
- CMake 3.1.0 or later
- GCC 4.8 or later
- Protocol Buffers
- (optional) Google Test
- Required only when
-DPRIMITIV_BUILD_TESTS=ON.
- Required only when
- (optional) CUDA 7.5 or later
- Required only when
-DPRIMITIV_USE_CUDA=ON
- Required only when
The default protobuf repository on Ubuntu 16.04 does not support proto3 format and
users need to install newer library from source.
Typical step to build/install protobuf is below:
sudo apt install autoconf automake build-essential cmake libtool unzip
git clone https://github.com/google/protobuf
cd protobuf
./autogen.sh
./configure
make [-j <threads>]
make check
sudo make install
sudo ldconfig
git clone <this repository>
cd primitiv
mkdir build
cd build
cmake .. [-DPRIMITIV_USE_CUDA=ON] [(Other options listed below if necessary)]
make [-j <threads>]
[make test]
[make install]
PRIMITIV_BUILD_STATIC_LIBRARY(default=OFF)- Builds a static library instead of a shared object.
PRIMITIV_BUILD_TESTS(default=OFF)- Builds test binaries and generates
make testcommand.
- Builds test binaries and generates
PRIMITIV_BUILD_TESTS_PROBABILISTIC(default=OFF)- Builds test cases that probabilistically fails.
PRIMITIV_GTEST_SOURCE_DIR(default="")- Specifies the source directory of Google Test. If you want to use
googletestmodule provided from Debian/Ubuntu repository, add-DPRIMITIV_GTEST_SOURCE_DIR=/usr/src/googletest/googletesttogether with-PRIMITIV_BUILD_TESTS=ONoption.
- Specifies the source directory of Google Test. If you want to use
PRIMITIV_USE_CACHE(default=OFF)- Whether or not to use cached values to prevent increasing computation amount.
- Libraries built with this flag will tend to consume more memory.
PRIMITIV_USE_CUDA(default=OFF)- Enables CUDA backend (
devices::CUDAclass).
- Enables CUDA backend (
- Other available options:
- CMake standard options.
- FindCUDA options.
- FindProtobuf options.
- FindGTest options.
- Short Python tutorial with solving XOR problem.
- Other examples.
- yus.takara at gmail.com
- @odashi_t on Twitter