gpt4 book ai didi

google-chrome - tensorflowjs 的后端 webgl 注册失败

转载 作者:行者123 更新时间:2023-12-04 11:31:19 28 4
gpt4 key购买 nike

正如 tensorflowjs github 中所建议的,我在这里发布了这个问题。在使用 tensorflow 的最简单示例中,我遇到了错误。

错误:
enter image description here

代码:一个简单的 html 片段,只加载了 tfjs。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.15.3/dist/tf.min.js"></script>
<title>Testing Tfjs</title>
</head>
<body>
<h2>Testing Tfjs</h2>
</body>
</html>

浏览器:Chrome 版本 72.0.3626.119
操作系统:Win 10,GPU:GT 740M,版本 397.44。
Chrome gpu show 说:(因为我禁用了硬件加速以避免 chrome 有时变黑)
WebGL: Software only, hardware acceleration unavailable, 
WebGL2: Software only, hardware acceleration unavailable

我曾尝试将后端明确设置为 cpu,但没有帮助。我在 github 上看到其他帖子谈论这个错误,但徒劳无功。

最佳答案

对不起,我的英语不好。
和我的情况一样。
就我而言...
“此设备不支持 WebGL”和
“tf.setBackend('webgl')”返回false。
Tensorflow 需要硬件加速。
打开 chrome://gpu,然后检查您的

  • 图形功能状态
  • 检测到的问题
  • 硬件 GPU 的图形功能状态
  • 检测到硬件 GPU 的问题

  • 检测到问题。

    Gpu compositing has been disabled, either via blocklist, about:flags or the command line. The browser will fall back to software compositing and hardware acceleration will be unavailable.Disabled Features: gpu_compositing


    然后转到 chrome://flags/
    搜索“覆盖软件渲染列表”> 设置启用> 重新启动浏览器
    谢谢。

    关于google-chrome - tensorflowjs 的后端 webgl 注册失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54971976/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com