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