Downloads · 30 days
0
lixiangchun/tfjs_resnet18
tfjs_resnet18 is a machine learning model from lixiangchun. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Oct 17, 2022
Repo size
46.7 MB
Likes
0
Public
Click a slice to open those files.
.bin46.7 MB · 100%
From the Hugging Face model README
const tf = require('@tensorflow/tfjs');
const tfnode = require('@tensorflow/tfjs-node');
async function loadModel(){
const handler = tfnode.io.fileSystem('checkpoint/model.json');
const model = await tf.loadGraphModel(handler);
console.log("Model loaded")
const zeros = tf.randomNormal([8, 3, 224, 224]);
const out = model.predict(zeros);
console.log(out);
out.print();
}
loadModel();