tensorflow/tfjs-tsne

README.md script tag instructions don't work with tfjs v1

Closed this issue · 5 comments

This throws a Uncaught (in promise) TypeError: n is not a function error in chrome & ff:

<!DOCTYPE html>
<meta charset='utf-8'>

<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-tsne"></script>

<script>
  const tfdata = tf.randomUniform([2000,10]);
  const tsneOpt = tsne.tsne(tfdata);
  tsneOpt.compute()
</script>

Downgrading tfjs fixes:

<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.14.1"></script>

@Nicola17 Are there any plans to update tfjs-tsne to use v1.x of tensorflow.js?

Hi @zhihua-chen, unfortunately I don't have any plans at the moment :(
I know @bldrvnlw did some work on it, @bldrvnlw do you have a version running with v1.x?

@Nicola17 We have an intern who has started working on this a little bit.

What I find interesting is that the observable notebooks (eg. https://observablehq.com/@mbostock/lets-try-t-sne) do not work even though use the of the 0.14 release of tfjs