export labels
Browse files- nodejs/generate_model.js +1 -0
nodejs/generate_model.js
CHANGED
@@ -55,6 +55,7 @@ async function trainModel() {
|
|
55 |
|
56 |
await model.fit(images, labels, { epochs: 5 });
|
57 |
await model.save('file://./saved-model'); // Save in TensorFlow.js format
|
|
|
58 |
console.log('Model saved as TensorFlow.js format');
|
59 |
}
|
60 |
|
|
|
55 |
|
56 |
await model.fit(images, labels, { epochs: 5 });
|
57 |
await model.save('file://./saved-model'); // Save in TensorFlow.js format
|
58 |
+
fs.writeFileSync('./labelMap.json', JSON.stringify(dataset.labelMap));
|
59 |
console.log('Model saved as TensorFlow.js format');
|
60 |
}
|
61 |
|