This is a Pytorch implementation for reproducing the results of the paper
Dexiong Chen, Laurent Jacob, Julien Mairal. Recurrent Kernel Networks. In NeurIPS, 2019.
We recommend users to use anaconda to install the following packages (link to pytorch)
numpy
scipy
scikit-learn
pytorch=1.2.0
biopython
pandas
The code uses Pytorch just-in-time (JIT) to compile cpp and cuda extension code.
Thus, you need to download CUDA Toolkit 9.0 to some $cuda_dir
and then run
export CUDA_HOME="$cuda_dir"
export TORCH_EXTENSIONS_DIR="$PWD/tmp"
export PYTHONPATH=$PWD:$PYTHONPATH
where the compiled extension files will be saved to TORCH_EXTENSIONS_DIR
.
Download SCOP 1.67 fold recognition datasets and then do mkdir data
and put the datasets to ./data/SCOP167-fold/
.
To train a model on a.102.1, with BLOSUM62 embedding, k=14, sigma=0.4 and max pooling, run
cd experiments
python train_scop.py --pooling max --embedding blosum62 --kmer-size 14 --alternating --sigma 0.4 --tfid 0
First download SCOP 1.75 and SCOP 2.06 which were downloaded from DeepSF and preprocessed.
Then unzip them respectively to ./data/SCOP175
and ./data/SCOP206
.
Then run
cd experiments
python train_scop175.py --alternating