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.

Saving a trained model in MacOS X problem

See original GitHub issue

TensorFlow.js version

tfjs-node@0.1.11 MacOS X 10.12.5 node v9.4.0

Describe the problem or feature request

Trying to train a model and then save it with: await model.save('file:///./model');

And I get a message: (node:2792) UnhandledPromiseRejectionWarning: Error: Cannot find any save handlers for URL 'file:///./model'

How to properly save the trained model?

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
caisqcommented, Aug 11, 2018

@ProgrammingLife

  1. In your package.json, make sure you have included the dependency such as “@tensorflow/tfjs-node”: “^0.1.11”

  2. In your .js file, do after const tf = require("@tensorflow/tfjs");: require('@tensorflow/tfjs-node');

Let us know if that works.

0reactions
ProgrammingLifecommented, Aug 11, 2018

Wow it worked! Thanks! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cant save on device updated trained model #431 - GitHub
Trying to save model to support directory try model.write(to: permanentUrl) Cant save the model Error Domain=com.apple.
Read more >
Save and load models | TensorFlow Core
Model progress can be saved during and after training. This means a model can resume where it left off and avoid long training...
Read more >
How to save/restore a model after training? - Stack Overflow
After 2 epochs (of 2 batches each), we save the "trained" model with tf. saved_model. simple_save . If you run the code as...
Read more >
How to Save and Load Your Keras Deep Learning Model
The first two examples save the model architecture and weights separately. The model weights are saved into an HDF5 format file in all...
Read more >
EASY FIX: Could Not Save File Already In Use Mac OS X
How to fix a very frustrating bug in OS X when you try and save a file. It all comes from the Finder's...
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