当前位置:网站首页>ConnectionRefusedError: [Errno 111] Connection refused问题解决
ConnectionRefusedError: [Errno 111] Connection refused问题解决
2022-08-04 05:29:00 【≈落小朵】
解决方法一
same adress
对于我的电脑不好用
使用python指定GPU,如下
有一台服务器,服务器上有多块儿GPU可以供使用,但此时只希望使用第2块和第4块GPU,但是我们希望代码能看到的仍然是有两块GPU,分别编号为0,1,这个时候我们可以使用环境变量CUDA_VISIBLE_DEVICES来解决这个问题。
比如:
CUDA_VISIBLE_DEVICES=1 只有编号为1的GPU对程序是可见的,在代码中gpu[0]指的就是这块儿GPU
CUDA_VISIBLE_DEVICES=0,2,3 只有编号为0,2,3的GPU对程序是可见的,在代码中gpu[0]指的是第0块儿,gpu[1]指的是第2块儿,gpu[2]指的是第3块儿
CUDA_VISIBLE_DEVICES=2,0,3 只有编号为0,2,3的GPU对程序是可见的,但是在代码中gpu[0]指的是第2块儿,gpu[1]指的是第0块儿,gpu[2]指的是第3块儿
在python程序中,我们可以这么写
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
torch.cuda.is_available()
dev = torch.device("cuda") / torch.device("cpu")
边栏推荐
- Android connects to mysql database using okhttp
- 超详细MySQL总结
- Matplotlib中的fill_between;np.argsort()函数
- SQL练习 2022/7/2
- [Deep Learning 21 Days Learning Challenge] 2. Complex sample classification and recognition - convolutional neural network (CNN) clothing image classification
- 基于PyTorch的FCN-8s语义分割模型搭建
- pgsql函数中的return类型
- k3s-轻量级Kubernetes
- [Deep Learning 21 Days Learning Challenge] Memo: What does our neural network model look like? - detailed explanation of model.summary()
- Androd Day02
猜你喜欢

(十二)树--哈夫曼树

Kubernetes基本入门-元数据资源(四)

Polynomial Regression (PolynomialFeatures)

Usage of RecyclerView

【go语言入门笔记】12、指针

npm install dependency error npm ERR! code ENOTFOUNDnpm ERR! syscall getaddrinfonpm ERR! errno ENOTFOUND

(十三)二叉排序树

Thoroughly understand box plot analysis

TensorFlow2 study notes: 6. Overfitting and underfitting, and their mitigation solutions

【CV-Learning】线性分类器(SVM基础)
随机推荐
oracle临时表与pg临时表的区别
WARNING: sql version 9.2, server version 11.0. Some psql features might not work.
k9s-终端UI工具
Jupyter Notebook安装库;ModuleNotFoundError: No module named ‘plotly‘解决方案。
Kubernetes基本入门-概念介绍(一)
Matplotlib中的fill_between;np.argsort()函数
MAE 论文《Masked Autoencoders Are Scalable Vision Learners》
【深度学习21天学习挑战赛】2、复杂样本分类识别——卷积神经网络(CNN)服装图像分类
PostgreSQL模式(Schema)
(十六)图的基本操作---两种遍历
The pipeline mechanism in sklearn
图像线性融合
0, deep learning 21 days learning challenge 】 【 set up learning environment
(十一)树--堆排序
postgres 递归查询
剑指 Offer 2022/7/5
【CV-Learning】语义分割
MySql--存储引擎以及索引
TensorFlow2学习笔记:5、常用激活函数
Jupyter Notebook installed library;ModuleNotFoundError: No module named 'plotly' solution.