tensorflow / tfjs-tsne

Apache License 2.0
314 stars 57 forks source link

T-SNE in browser example throws error #55

Open chan1 opened 6 years ago

chan1 commented 6 years ago

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

nsthorat commented 6 years ago

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 commented 6 years ago

The hosted example should be updated now.

chan1 commented 6 years ago

Confirmed that it now works. Thanks!

cpietsch commented 5 years ago

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

hpouillot commented 5 years ago

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

cpietsch commented 5 years ago

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