Machine Learning: Saving Model Fixed, crating necesary folders before the file.

This commit is contained in:
Luis Fernando Molina committed 2021-03-08 09:46:37 +01:00
1 parent 77c52824fb
commit f22a679046
4 files changed
+48 -37

No files matched your search

@@ -319,7 +319,11 @@ exports.newTensorFlowBotModulesTensorFlowLibrary = function (processIndex) {
}
async function saveModel() {
await tensorFlowModel.save('file://' + getModelPath())
let fileLocation = getModelPath()
/* If necesary a folder or folders are created before writing the file to disk. */
TS.projects.superalgos.utilities.miscellaneousFunctions.mkDirByPathSync(fileLocation)
await tensorFlowModel.save('file://' + fileLocation)
}
function getModelPath() {