栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

failed to create cublas handle: CUBLAS

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

failed to create cublas handle: CUBLAS

 1.报错 问题:(来自GCN_Keras-master代码) 在Pycharm运行GCN_Keras代码的时候,报错:

①Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

您的CPU支持该TensorFlow二进制文件未编译为使用的指令:AVX2 FMA

原因:成功解决Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2

②failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED

原因:

解决:failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED

2.解决方法

①Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

开头加入代码:可以临时屏蔽警告信息

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' 

②failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED

开头加入代码:固定分配显存

import tensorflow as tf
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options)) 

或:

可能开的程序太多了,jupyter和pycharm尽量不要一起开,关掉其他的试试。


 其中代码来自:图卷积神经网络 with Keras

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/530340.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号