mnist-node example: backend.select is not a function
See original GitHub issueTo 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:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
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
This should because of some ops updates in tfjs-core KernelBackend. I’m updating NodeJSKernelBakcend to fix it.