Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in support for NodeJS between v0.13.5 and 0.14.1 #1001

Closed
Bluebie opened this issue Dec 17, 2018 · 3 comments
Closed

Regression in support for NodeJS between v0.13.5 and 0.14.1 #1001

Bluebie opened this issue Dec 17, 2018 · 3 comments

Comments

@Bluebie
Copy link

Bluebie commented Dec 17, 2018

TensorFlow.js version

0.14.1

Browser version

NodeJS v11.3.0 (installed via Homebrew)

Describe the problem or feature request

In 0.14.1 requiring tfjs and tfjs-node in a nodejs script does not seem to register the C version of tensorflow correctly. Models cannot be saved out to a file using the file:// handler (errors saying no appropriate handler available), training goes unusually slowly (Javascript CPU?)

Code to reproduce the bug / link to feature request

grab this: Bluebie/motion-estimation-tfjs@2b2f369

npm i
node index

and you should see the file:// handler missing error, e.g:

phx@amanita ~/D/motion-estimation-tfjs> node index
cpu backend was already registered. Reusing existing backend
2018-12-17 19:53:22.294912: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA
Loading training dataset
Loaded pictures
Setting up model...
Training, batches remaining: 250
============================= Model Accuracy on testset: 53.6% - batch 1
(node:34666) UnhandledPromiseRejectionWarning: Error: Cannot find any save handlers for URL 'file://./motionDense1'
    at new ValueError (/Users/phx/Downloads/motion-estimation-tfjs/node_modules/@tensorflow/tfjs-layers/dist/errors.js:36:28)
    at Sequential.<anonymous> (/Users/phx/Downloads/motion-estimation-tfjs/node_modules/@tensorflow/tfjs-layers/dist/engine/training.js:906:39)
    at step (/Users/phx/Downloads/motion-estimation-tfjs/node_modules/@tensorflow/tfjs-layers/dist/engine/training.js:42:23)
    at Object.next (/Users/phx/Downloads/motion-estimation-tfjs/node_modules/@tensorflow/tfjs-layers/dist/engine/training.js:23:53)
    at /Users/phx/Downloads/motion-estimation-tfjs/node_modules/@tensorflow/tfjs-layers/dist/engine/training.js:17:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/phx/Downloads/motion-estimation-tfjs/node_modules/@tensorflow/tfjs-layers/dist/engine/training.js:13:12)
    at Sequential.Model.save (/Users/phx/Downloads/motion-estimation-tfjs/node_modules/@tensorflow/tfjs-layers/dist/engine/training.js:898:16)
    at main (/Users/phx/Downloads/motion-estimation-tfjs/index.js:62:38)
(node:34666) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:34666) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@nkreeger
Copy link
Contributor

Currently @tensorflow/tfjs-node ships the @tensorflow/tfjs package as well. This package currently ships 0.13.5: https://github.com/tensorflow/tfjs-node/blob/v0.1.21/package.json#L43

I'm working on a new Node package release that will probably go out today or tomorrow that will include 0.14.1.

@nkreeger
Copy link
Contributor

@Bluebie try now - just published 0.2.0

@Bluebie
Copy link
Author

Bluebie commented Dec 18, 2018

Seems to be working well now! Thanks!

@Bluebie Bluebie closed this as completed Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants