Reproduce CVPR 2018 LearningToCompare_FSL environment on Moment Pool Cloud
IPFS
This is a few-shot learning paper from CVPR 2018: Learning to Compare: Relation Network for Few-Shot Learning
Source address: https://github.com/floodsung/LearningToCompare_FSL
The environment uses Tensorflow 1.4 because it is cuda8.
switch conda source
bash /public/script/switch_conda_source.sh
Create a virtual python environment
conda create -n py27 python=2.7
conda deactivate conda activate py27
Install torch 0.3
The next task is to find the whl installation package for torch 0.3, which I found from the link below
https://download.pytorch.org/whl/cu80/torch_stable.html
Here I am directly pip, just copy the following command.
pip install https://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp27-cp27mu-linux_x86_64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple some- package pip install torchvision==0.2.1 pip install matplotlib scipy
pip list
Pull the github library
git clone https://github.com/brendenlake/omniglot.git
I use a github mirror here to complete
git clone https://hub.fastgit.org/floodsung/LearningToCompare_FSL.git cd LearningToCompare_FSL/ ls
Unzip the file and test run
cd /LearningToCompare_FSL/datas unzip omniglot_28x28.zip cd /LearningToCompare_FSL/omniglot python omniglot_train_one_shot.py -w 5 -s 1 -b 19
Check if gpu is used
nvidia-smi -l 5
View article
Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!
- Author
- More