From 920bc22b13a2e1865cd747e75a536b5ff1367e84 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 20 Feb 2021 12:16:56 +0100 Subject: [PATCH] Multiple Features and Labels --- .../TensorFlowLibrary.js | 18 +++++++++++++----- 1 file changed, 13 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 eaf5494f1..04e7e7e3a 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 @@ -229,8 +229,20 @@ exports.newTensorFlowBotModulesTensorFlowLibrary = function (processIndex) { Check if this is the input layer. */ if (secuentialModel.inputLayer.referenceParent.id === layerNode.id) { + /* + If there is a explicitly defined Input Shape, then we will take it, + otherwise, we will count the amount of features declared. + */ if (secuentialModel.inputLayer.inputShape !== undefined) { - argsObject.inputShape = secuentialModel.inputLayer.inputShape.config.value + if (argsObject.inputShape = secuentialModel.inputLayer.inputShape !== undefined) { + if (argsObject.inputShape = secuentialModel.inputLayer.inputShape.config.value !== undefined) { + argsObject.inputShape = secuentialModel.inputLayer.inputShape.config.value + } + } + } + if (argsObject.inputShape === undefined) { + argsObject.inputShape = [] + argsObject.inputShape.push(secuentialModel.inputLayer.inputFeatures.dataFeatures.length) } } @@ -397,10 +409,6 @@ exports.newTensorFlowBotModulesTensorFlowLibrary = function (processIndex) { }) tensorFlowModel.summary() - /* - if something is bad, return this... - */ - //callbackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_FAIL_RESPONSE) }