在使用tensorflow2.4.0版本运行图像风格化代码是出现了以下错误:
tensorflow.python.framework.errors_impl.InternalError: Blas xGEMM launch failed : a.shape=[1,480000,64], b.shape=[1,480000,64], m=64, n=64, k=480000 [Op:Einsum]
查阅资料找到了以下两种解决方案:
1.在程序里添加以下代码:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '/gpu:0'
程序能够正常运行,只是用的是cpu了,程序运行速度变慢了很多。
2.修改cudnn的版本,不过一般不建议这样做,太麻烦了。