Last active
November 15, 2020 15:32
-
-
Save aniketbiprojit/dbc3d95f190657ef2e5026f4e8661d4e to your computer and use it in GitHub Desktop.
Training model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const run = async (X_tensor,y_tensor,revision) => { | |
const model = await load_model() | |
model.fit(X_tensor, y_tensor, { | |
epochs: 10, | |
batchSize: 32, | |
callbacks: { onBatchEnd }, | |
}) | |
.then((info) => { | |
console.log('Final accuracy', info.history.acc) | |
}) | |
model.save(`file:///${__dirname}/tfjs-${revision}`) | |
} | |
run(X_tensor,y_tensor,Date.now()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment