Comments (3)
Hi, @GodsDusk
Thank you for bringing this issue to our attention and I see in your model.json
file the model format is "format": "layers-model"
so you'll have to use tf.loadLayersModel so please give it try with tf.loadLayersModel()
instead of tf.loadGraphModel()
I tried to load model with tf.loadLayersModel()
and it's loading I confirmed by printing the model summary please refer below output log :
Here is my tfjs.html
file :
<!DOCTYPE html>
<html>
<head>
<title>TensorFlow.js Model Loading Example</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js"></script>
<script>
async function demo() {
try {
const model = await tf.loadLayersModel("http://127.0.0.1:5500/test-8178/model/model.json");
console.log("Model summary:", model.summary());
} catch (error) {
console.error("Error loading model:", error);
}
}
demo();
</script>
</body>
</html>
If I have missed something here please let me know and if possible please help with your Github repo with complete steps to replicate the same behavior from our end to investigate this issue further. Thank you for your cooperation and patience.
from tfjs.
it worked, thanks
from tfjs.
Are you satisfied with the resolution of your issue?
Yes
No
from tfjs.
Related Issues (20)
- `tf.einsum` appears incorrect for some cases HOT 2
- Installing tensorflow/tfjs-node fails on macOS Sonoma (14.3) on Apple Silicon ("Command failed: node-pre-gyp install --fallback-to-build HOT 11
- Tensorflow.js Converter: Usage of `save_format` when converting to graph model causes error on Keras 3 HOT 1
- [Codelab]: Making Predictions from 2D Data HOT 4
- Docs/readme left unfinished for model "face-landmarks-detection" HOT 4
- Error dumping weights duplicate weight name kernel HOT 9
- Loading movenet gives Uncaught (in promise) TypeError: Failed to fetch HOT 15
- Next.js Cannot get final name for export 'transposeImplCPU' error HOT 2
- Tensors are leaked when `model.save()` includes the optimizer HOT 3
- Load and save model issue HOT 5
- [Codelab]: Making Predictions from 2D Data HOT 4
- Duplicate weight problem HOT 7
- The if statement refers to `bias.shape.length`, but the error message refers to `kernel.shape.length` HOT 6
- Question: is the Windows tensorflow binary / dll used in tfjs-node compiled with support for zenDNN optimisations? HOT 2
- Standard layers (like `tf.layers.dense`) fail to report their trainable weights, when used from within a custom layer HOT 2
- Error installing @tensorflow/tfjs-node at WSL Ubuntu HOT 3
- Bug when stacking LSTM HOT 4
- Tensor construction fails for the majority of TypedArray types HOT 1
- Trouble loading a saved model in tfjs-node, "Op type not registered 'DisableCopyOnRead'" HOT 1
- tfjs-node - upgrade tar >=6.2.1 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tfjs.