Skip to content

Instantly share code, notes, and snippets.

@curiousily
Created July 16, 2019 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curiousily/34fb19b12935eb43aa57660ace5c80c4 to your computer and use it in GitHub Desktop.
Save curiousily/34fb19b12935eb43aa57660ace5c80c4 to your computer and use it in GitHub Desktop.
const X = tf.tensor2d([
// pink, small
[0.1, 0.1],
[0.3, 0.3],
[0.5, 0.6],
[0.4, 0.8],
[0.9, 0.1],
[0.75, 0.4],
[0.75, 0.9],
[0.6, 0.9],
[0.6, 0.75]
]);
// 0 - no buy, 1 - buy
const y = tf.tensor([0, 0, 1, 1, 0, 0, 1, 1, 1].map(y => oneHot(y, 2)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment