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.

Load model from variables

See original GitHub issue

I’m using tfjs 1.3.1 on Google Chrome v77.

I have the model topography and weights as blobs and I want to load a model with these. In other words, if var model and var weights have the contents of model.json and weights.bin respectively, how do I use tf.loadLayersModel on them?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
pyu10055commented, Nov 20, 2019

@harishkrishnav The LoadHandler interface has no requirement for a path, you can take a look at the BrowserFile implementation, you can have the data as part of your own IOHandler class, you can totally ignore what is passed into the IOHandler constructor. The only thing you need to do is to construct the ModelArtifacts as output of the load method.

0reactions
harishkrishnavcommented, Nov 22, 2019

Many thanks @pyu10055

Read more comments on GitHub >

github_iconTop Results From Across the Web

Save and load Keras models | TensorFlow Core
When saving the model and its layers, the SavedModel format stores the class name, call function, losses, and weights (and the config, if ......
Read more >
How to Save and Load Your Keras Deep Learning Model
You can save your model by calling the save() function on the model and specifying the filename. The example below demonstrates this by...
Read more >
Save and re-load models
Saving the model is quite easy, use the package such as yaml to write the model object as a YAML file. Any format...
Read more >
Load model from variable - javascript - Stack Overflow
You can do this by using THREE.JSONLoader.parse instead of THREE.JSONLoader.load : var loader = new THREE.JSONLoader(); var geometry ...
Read more >
Save and load models in Tensorflow - GeeksforGeeks
Below is an example that depicts all the above methods to save and load the model. Here we develop a model and train...
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