python
Johnny-222
这个作者很懒,什么都没留下…
展开
-
Anaconda创建环境 更换镜像源下载库
前言本文记录了使用anaconda创建一个环境,并整理了更换镜像源下载需要的包一、创建一个环境conda create --name torch_demopython=3.7# 其中的python=3.7为指定python版本,根据需要修改在anaconda中创建了一个名为“torch_demo”的环境二、切换一个已创建的环境代码如下(示例):conda activate torch_demo如图,从base环境切换到crs环境(一个新建的环境)...原创 2020-09-09 15:30:53 · 1734 阅读 · 0 评论 -
Linux 后台指定 GPU 运行 python代码
首先使用cd xxx命令调到包含test1.py和test2.py的文件路径下,接着分别在两张卡上跑两个不同的程序,命令如下:CUDA_VISIBLE_DEVICES=0 nohup python test1.py --Label -1 >nohup1.out 2>&1 &CUDA_VISIBLE_DEVICES=1 nohup python test2.py --Label -2 >nohup2.out 2>&1 &其中,CUDA_VI原创 2020-05-19 20:14:36 · 4303 阅读 · 0 评论