deepworks is a C++ framework for deep learning. We integrate acceleration libraries such as Eigen to maximize performance.
- Features
- Documentation
- Dependencies
- Build from source
- Examples
- Samples
- Comparison with other libraries
- License
- ReLU
- Leaky ReLU
- ELU
- Sigmoid
- SoftMax
- Convolution
- MaxPooling
- GlobalAvgPooling
- Linear
- BatchNormalization1D
- BatchNormalization2D
- Dropout
CrossEntropyLoss- criterion combines Log and NLLLoss. The input is expected to contain normalized scores (after SoftMax) for each class.
accuracy- compute the frequency with which predictions matches labels.accuracyOneHot- compute the frequency with which predictions matches one-hot labels.
zeros- fills the tensor with zeros.constant- fills the tensor withvalue.xavierUniform- fills the input Tensor with values according to the method described in Understanding the difficulty of training deep feedforward neural networks - Glorot, X. & Bengio, Y. (2010), using a uniform distribution.uniform- fills the tensor with values drawn from the uniform distribution U(lower, upper).
save_state - save model weights in .bin file.
load_state - load model weights from .bin file to model.
save_cfg - save model architecture to .bin file.
load_cfg - load model architecture from .bin file.
save - save model weights and config to .bin files.
load - load model weights and config from .bin files.
save_dot - dump model architecture to .dot file for vizualization.
- PNG/JPEG images
- CSV
Install dependencies for image reader
On Linux
sudo apt install libpng-dev
sudo apt install libjpeg-dev
On MacOS
brew install libpng
brew install jpeg
git clone https://github.com/NeuralDeepWorks/deepworks.git
cd deepworks
git submodule init
git submodule update --recursive
git lfs pull
mkdir build
cd build
cmake ..
make -j8
Some cmake options are available:
| options | description | default | additional requirements to use |
|---|---|---|---|
| BUILD_TESTS | Build unit tests | ON1 | - |
| WITH_EIGEN | Build prolect with Eigen | ON2 | - |
| BUILD_SAMPLES | Build samples | ON | - |
| BUILD_BENCHMARKS | Build benchmarks | ON | - |
| DOWNLOAD_DATA | Download datasets for samples/benchmarks | ON | - |
1 deepworks uses Google Test as default framework to run unit tests. No pre-installation required, it's automatically downloaded during CMake configuration.
2 deepworks uses Eigen to CPU backend. No pre-installation required, it's automatically downloaded during CMake configuration.
Construct simple neural network
dw::Placeholder in(dw::Shape{64, 100});
auto out = dw::Linear(50, "linear_0")(in);
out = dw::ReLU("relu_1")(out);
out = dw::Linear(10, "linear_2")(out);
out = dw::Softmax("probs")(out);
dw::Model model(in, out);
dw::Tensor input(in.shape());
dw::initializer::uniform(input);
model.compile();
dw::Tensor output(model.outputs()[0].shape());
model.forward(input, output);GNU General Public License v3.0