This repository contains implementation of various TensorFlow layers that can benefit of using locality-sensitive hashing.
Build the pip package with make as:
make zero_out_pip_pkg
Install the pip package as:
pip3 install artifacts/*.whl
Test zero_out op as:
cd ..
python3 -c "import tensorflow as tf;import tensorflow_zero_out;print(tensorflow_zero_out.zero_out([[1,2], [3,4]]))"
And you should see the op zeroed out all input elements except the first one:
[[1 0]
[0 0]]
Build the pip package with make as:
make lsh_matmul_pip_pkg
Install the pip package as:
pip3 install artifacts/*.whl
Test LSHMatMul Keras layer as:
python examples/lsh_matmul_keras_test.py
And you should see the output as: