matpool
matpool

矩池云 专注于人工智能领域的云服务商 https://matpool.com/

在矩池云上复现 CVPR 2018 LearningToCompare_FSL 环境

这是 CVPR 2018 的一篇少样本学习论文:Learning to Compare: Relation Network for Few-Shot Learning

源码地址:https://github.com/floodsung/LearningToCompare_FSL

环境选用 Tensorflow 1.4 因为他是 cuda8 的。


切换conda源

bash /public/script/switch_conda_source.sh


创建虚拟python环境

conda create -n py27 python=2.7


conda deactivate
conda activate py27


安装 torch 0.3

接下来的任务是找 torch 0.3 的whl安装包,我从下面的链接中找到了

https://download.pytorch.org/whl/cu80/torch_stable.html

我这里是直接pip,复制下面的命令即可。

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


拉取github库

git clone https://github.com/brendenlake/omniglot.git

我这里用了一个github镜像来完成

git clone https://hub.fastgit.org/floodsung/LearningToCompare_FSL.git
cd LearningToCompare_FSL/
ls


解压文件并测试运行

cd /LearningToCompare_FSL/datas
unzip omniglot_28x28.zip
cd /LearningToCompare_FSL/omniglot
python omniglot_train_one_shot.py -w 5 -s 1 -b 19 


查看有没有使用到gpu

nvidia-smi -l 5


查看文章

矩池云上如何加速 GitHub 下载?

矩池云上执行 conda install 的时候下载特别慢怎么办?怎么切换源?

https://pytorch.org/get-started/previous-versions/

CC BY-NC-ND 2.0 版权声明

喜欢我的文章吗?
别忘了给点支持与赞赏,让我知道创作的路上有你陪伴。

加载中…

发布评论