Tfjs: API Reference code examples not working in chrome (ubuntu 16.04) when using WebGL

Created on 12 Apr 2018  路  7Comments  路  Source: tensorflow/tfjs

TensorFlow.js version

all Versions

Browser version

Version 65.0.3325.181 (Official Build) (64-Bit)

Describe the problem or feature request

Many code examples from the API Reference are not working in Chrome for Ubuntu e.g. tf.fromPixels. Output in Firefox is [ [[100, 150, 200],]]
Output in Chrome is [ [[0, 0, 0],]]

When I disable WebGL trough an extension the code works as expected also in Chrome.
In Firefox on Ubuntu everything is working as expected.

Other examples: tf.cast, tf.pad, tf.concat, tf.gather, tf.reverse, tf.slice, tf.split, tf.stack (and many more)
Output is always zero.

Code to reproduce the bug / link to feature request

https://js.tensorflow.org/api/0.9.0/#fromPixels

My System:

CPU: Intel(R) Core(TM) i7-7820X CPU @ 3.60GHz
GPU: 2x Nvidia Titan Xp
64GB Ram
Nvidia Drivers: NVIDIA binary driver - version 390.48 from nvidia-390 (open source)

bug

Most helpful comment

@xam-ps thanks for reporting this. We recently added a debug page to help us diagnose possible causes, could you go to https://js.tensorflow.org/debug/ and post a screenshot of what you see there?

All 7 comments

@xam-ps thanks for reporting this. We recently added a debug page to help us diagnose possible causes, could you go to https://js.tensorflow.org/debug/ and post a screenshot of what you see there?

@tafsiri this is the error I get on the console:

Uncaught Error: No backend found in registry. tfjs@latest:1
    at e.getBestBackendType (tfjs@latest:1)
    at e.evaluateFeature (tfjs@latest:1)
    at e.get (tfjs@latest:1)
    at e.initDefaultBackend (tfjs@latest:1)
    at e.get [as engine] (tfjs@latest:1)
    at new e (tfjs@latest:1)
    at Function.e.make (tfjs@latest:1)
    at Function.e.tensor (tfjs@latest:1)
    at Object.e.scalar (tfjs@latest:1)
    at (index):153

Browser:
Chromium Version 65.0.3325.181 (Offizieller Build) Built on Ubuntu , running on Ubuntu 16.04 (64-Bit)
Same error in Chrome (same version number)

Just ran 'fromPixels' again (v.0.9.0) on the API-Documentation. As result I now get really strange values:

[ [[233713536, -2147483648, -2147483648],]]
[ [[233714048, 0, -2147483648],]]
[ [[233713536, 0, 0],]]
[ [[233714048, 0, 0],]]
[ [[233714048, -2147483648, 0],]]

Output changes every couple seconds. It seems like somehow a time-function is involved.
No output on the console.

Using Ubuntu 16.04 on Chrome, Chromium, Firefox, and Firefox Developer Edition I get results:

image

But on a Windows machine we see the same error message as @xam-ps on Chrome, Firefox, and Edge

Now getting a message on the debug page:

  • Chrome:
    bildschirmfoto vom 2018-05-02 14-29-43

  • Chromium:
    chromium vom 2018-05-02 14-30-13

Pretty strange, that I'm getting different values for the functions in Chrome and Chromium.

Firefox is perfectly working.

Seems like the problem finally got fixed with version "0.11.1.".
Thanks for the good work!

Also having problems
image
tf.version
image

On ubuntu 16.04 LTS. Also no problems on Firefox

Was this page helpful?
0 / 5 - 0 ratings