tensorflow.python.framework.errors

tensorflow.python.framework.errors,第1张

问题:tensorflow.python.framework.errors_impl.InternalError: Failed copying input tensor from /job:localhost/replica:0/task:0/device:CPU:0 to /job:localhost/replica:0/task:0/device:GPU:0 in order to run _EagerConst: Dst tensor is not initialized.

我这个是运行代码的中间出现的问题,我开始一直没有,突然就跑出来的,它要是显示“Process finished with exit code 137 (interrupted by signal 9: SIGKILL)”这个中断我还能理解,但是上面这个显示就明显是tensorflow的问题吧,就挺莫名其妙的。

我的解决办法:

降tensorflow还有tensoeflow-gpu。我的原始配置是tensorflow和tensorflow-gpu都是2.8.0,然后我uninstall他们,安装了2.5.0版本的。(如果你用了keras可能也得顺便降一下)。

不一定对所有人有用,还有,我重装的时候还出现了,pycharm突然就识别不到我的更新的内容,我就又重新安装了一次。

——————————————————————————————————

作为自己的经验整理,也顺便给大家参考,请勿diss

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/917042.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-16
下一篇 2022-05-16

发表评论

登录后才能评论

评论列表(0条)

保存