File size: 426 Bytes
fa86dca
 
 
 
 
f9960f1
fa86dca
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
```
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();

```