Clone the repository.
git clone https://github.com/tensorflow/custom-op.git
cd custom-opYou can build the pip package with make.
make -f Makefile.puhti zero_out_pip_pkgOnce the pip package has been built, you can install it with,
pip3 install artifacts/*.whlThen test out the pip package
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]]Clone the repository.
git clone https://github.com/tensorflow/custom-op.git
cd custom-opLoad module,
ml tensorflow/2.12Set env,
export SINGULARITY_BIND=$PWDRun shell within the container
singularity shell $SING_IMAGEBuild the op with make,
make -f Makefile.puhti time_two_opTest the op,
make -f Makefile.puhti time_two_testClone the repository.
git clone https://github.com/tensorflow/custom-op.git
cd custom-opLoad module,
module use /appl/local/csc/modulefiles/
ml tensorflow/2.12Set env,
export SINGULARITY_BIND=$PWDRun shell within the container
singularity shell $SING_IMAGEBuild the op with make,
make -f Makefile.lumi time_two_opTest the op,
make -f Makefile.lumi time_two_test