From 6180f79c567ee15be2c121faf1bd90ac1fb0e237 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 20 Feb 2021 08:44:36 +0100 Subject: [PATCH] training working --- .../Low-Frequency-Learning/TensorFlowLibrary.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/TensorFlowLibrary.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/TensorFlowLibrary.js index 5cf8b1bac..a7e16381a 100644 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/TensorFlowLibrary.js +++ b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/TensorFlowLibrary.js @@ -268,8 +268,8 @@ exports.newTensorFlowBotModulesTensorFlowLibrary = function (processIndex) { } let compileArgs = { optimizer: learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.optimizer.config.value, - loss: learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.lossFunction.config.value, - metrics: [learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.metrics.config.value] + loss: learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.lossFunction.config.value /*, + metrics: [learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.metrics.config.value]*/ } tensorFlowModel.compile(compileArgs) @@ -315,7 +315,7 @@ exports.newTensorFlowBotModulesTensorFlowLibrary = function (processIndex) { let layersModel = learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.api.layersModel let features = [] let labels = [] - + /* Building the Features Tensor */ @@ -355,10 +355,12 @@ exports.newTensorFlowBotModulesTensorFlowLibrary = function (processIndex) { tensorFlowData = require("@tensorflow/tfjs-data") function* featuresGenerator() { + console.log('Features: ' + features) yield features } function* labelsGenerator() { + console.log('Labels: ' + labels) yield labels } @@ -368,10 +370,10 @@ exports.newTensorFlowBotModulesTensorFlowLibrary = function (processIndex) { await tensorFlowModel.fitDataset(ds, { verbose: 1, - epochs: 1 + epochs: 10 }) - + tensorFlowModel.summary() /* if something is bad, return this... */