Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Registration of backend webgl failed for tensorflowjs

As suggested in tensorflowjs github, I post the question here. I am getting below error, in simplest example possible with tensorflow.

Error:
enter image description here

Code: A simple html snippet with just tfjs loading.

<!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/[email protected]/dist/tf.min.js"></script>
    <title>Testing Tfjs</title>
</head>
<body>
    <h2>Testing Tfjs</h2>    
</body>
</html>

Browser: Chrome Version 72.0.3626.119
OS: Win 10, GPU: GT 740M, version 397.44.
Chrome gpu show says : (because I disabled hw acceleration to avoid chrome blacking out at times)

WebGL: Software only, hardware acceleration unavailable, 
WebGL2: Software only, hardware acceleration unavailable

I have tried setting backend explicitly as cpu but it did not help. I have seen other posts in github talking about this error, but in vain.

like image 636
Parthiban Rajendran Avatar asked Oct 17 '22 06:10

Parthiban Rajendran


1 Answers

sorry, my english is not good.

Same as my case. in my case... "WebGL is not supported on this device" and "tf.setBackend('webgl')" return false.

Tensorflow require hardware acceleration.

open chrome://gpu, then check your

  • Graphics Feature Status
  • Problems Detected
  • Graphics Feature Status for Hardware GPU
  • Problems Detected for Hardware GPU

Problems Detected.

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

then goto chrome://flags/ search "Override software rendering list" > set enabled > restart browser

thx.

like image 101
feb30th Avatar answered Oct 21 '22 07:10

feb30th