question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mnist-node example: backend.select is not a function

See original GitHub issue

To get help from the community, check out our Google group.

TensorFlow.js version

0.12.4

The example here is not working properly: https://github.com/tensorflow/tfjs-examples/tree/master/mnist-node

When I add yarn followed by node index.js, I get the following error:

(node:199628) UnhandledPromiseRejectionWarning: TypeError: backend.select is not a function at environment_1.ENV.engine.runKernel.$condition (/usr/local/google/home/cais/tfjs/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-core/dist/ops/logical_ops.js:88:83) at /usr/local/google/home/cais/tfjs/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-core/dist/engine.js:115:26 at Engine.scopedRun (/usr/local/google/home/cais/tfjs/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-core/dist/engine.js:95:23) at Engine.runKernel (/usr/local/google/home/cais/tfjs/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-core/dist/engine.js:113:14) at where_ (/usr/local/google/home/cais/tfjs/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-core/dist/ops/logical_ops.js:88:37) at Object.where (/usr/local/google/home/cais/tfjs/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-core/dist/ops/operation.js:23:29) at Tensor.where (/usr/local/google/home/cais/tfjs/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-core/dist/tensor.js:554:26) at Object.$x (/usr/local/google/home/cais/tfjs/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-core/dist/ops/unary_ops.js:113:41) at Object.backpropagateGradients (/usr/local/google/home/cais/tfjs/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-core/dist/tape.js:81:47) at /usr/local/google/home/cais/tfjs/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-core/dist/engine.js:288:20

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nsthoratcommented, Jul 31, 2018

Just to diagnose this a little more, this is because of the loose versioning here: https://github.com/tensorflow/tfjs-node/blob/master/package.json#L42

Every time we add a kernel backend and update, you’ll break. I wonder if this should be an exact version. cc @dsmilkov

1reaction
kangyizhangcommented, Jul 31, 2018

This should because of some ops updates in tfjs-core KernelBackend. I’m updating NodeJSKernelBakcend to fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: .select is not a function - node.js - Stack Overflow
The error was due to await , it is not returning the query but the object, .select can only be operated on query...
Read more >
JavaScript: Uncaught TypeError: n is not a function
This error occurs if you try to execute a function that is not initialized or is not initialized correctly.
Read more >
Parameter space exploration, nengo_ocl and SpiNNaker
But when I tried running this on the nengo_ocl backend, I got an error that this neuron is not supported by the ocl...
Read more >
C++ Neural Network in a Weekend – ninepoints - Jeremy Ong
First, we must conceptualize the task as a “function” such that the inputs and ... In the previous example, we weighted the event...
Read more >
URL scheme must be "http" or "https" for CORS request
Models with control flow ops (e.g. RNNs) are not yet supported. ... copy the data.js, main.js, model.js and package.json files from the mnist-node...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found