This repository contains the source code of our paper: Inference, Learning and Attention Mechanisms that Exploit and Preserve Sparsity in Convolutional Networks Our implementation extents tensorflow by providing GPU implementations for layers that are able efficiently process large-scale, sparse data. For more details please refer to our paper.
After cloning this repository:
-
Follow: Installing TensorFlow to install tensorflow from source code.
-
build our sparse modules:
bazel build -c opt --config=cuda --strip=never -s //tensorflow/core/user_ops:direct_sparse_conv_kd.so
- set environment variables
echo 'export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$HOME/src/ILA-SCNN/bazel-bin/tensorflow/core/user_ops"' >> ~/.bashrc
echo 'export PYTHONPATH="$PYTHONPATH:$HOME/src/ILA-SCNN/tensorflow/core/user_ops"' >> ~/.bashrc
source ~/.bashrc
We provide the following examples:
The correct data sets will be downloaded automatically when running the scripts.