tfjs-tsne icon indicating copy to clipboard operation
tfjs-tsne copied to clipboard

T-SNE in browser example throws error

Open chan1 opened this issue 6 years ago • 6 comments

The example at this URL: https://storage.googleapis.com/tfjs-examples/tsne-mnist-canvas/dist/index.html . Throws an error when you I hit Start TSNE.

Varyings over maximum register limit tfjs-tsne-mnist.js:25403 Uncaught (in promise) Error: Failed to link vertex and fragment shaders. tfjs-tsne-mnist.js:25403 at Object.linkProgram (tfjs-tsne-mnist.js:25403) at Object.createVertexProgram (tfjs-tsne-mnist.js:28154) at Object.createBruteForceKNNProgram (tfjs-tsne-mnist.js:28422) at KNNEstimator.initilizeCustomWebGLPrograms (tfjs-tsne-mnist.js:28633) at new KNNEstimator (tfjs-tsne-mnist.js:28586) at TSNE. (tfjs-tsne-mnist.js:29959) at step (tfjs-tsne-mnist.js:29884) at Object.next (tfjs-tsne-mnist.js:29851) at fulfilled (tfjs-tsne-mnist.js:29818)

System Info: Chrome v67.0.3396.99 Official Build 64-bit MacBook Pro 13" 2016 High Sierra 10.13.5 Intel Iris Graphics 550 1.5GB

The example is linked to from this page to this

chan1 avatar Jul 19 '18 14:07 chan1

Sending a fix in https://github.com/tensorflow/tfjs-examples/pull/116. The example still gives strange results, so I'm going to assign this to @tafsiri to take a look when he's back from vacation.

nsthorat avatar Jul 19 '18 15:07 nsthorat

The hosted example should be updated now.

nsthorat avatar Jul 19 '18 15:07 nsthorat

Confirmed that it now works. Thanks!

chan1 avatar Jul 19 '18 16:07 chan1

Not sure why, but this error bubbled up again. For example https://beta.observablehq.com/@mbostock/lets-try-t-sne and https://beta.observablehq.com/@fil/hello-tfjs-tsne are now throwing:

Error: Failed to link vertex and fragment shaders.

I am sure that it was working by end of last year. Tested on Chrome Version 71.0.3578.98

cpietsch avatar Feb 12 '19 00:02 cpietsch

I had the same issue and it looks like it's not compatible with tfjs versions after 0.13.0.

hpouillot avatar Mar 03 '19 23:03 hpouillot

The Error: Failed to link vertex and fragment shaders. is now gone. But instead we are getting a TypeError: n is not a function when running ts.iterateKnn(3) which originates from the initialize function Still looking at the https://observablehq.com/@fil/hello-tfjs-tsne and also occurring on the latest https://github.com/tensorflow/tfjs-examples/tree/master/tsne-mnist-canvas @tafsiri

cpietsch avatar Mar 27 '19 09:03 cpietsch