Model Compiling for the first time
This commit is contained in:
1 parent
6aa2ebd8fe
commit
d0fb099c33
3 files changed
+180
No files matched your search
@@ -68,6 +68,7 @@ function newSuperalgosFunctionLibraryLearningSessionFunctions() {
|
||||
'Environment Flags->Debug Mode->Production Mode->' +
|
||||
'Supervised Learning->Unsupervised Learning->Self Learning->Reinforcement Learning->' +
|
||||
'Artificial Neural Network->Model->' +
|
||||
'Optimizer->Loss Function->Metrics->' +
|
||||
'Layers API->Code API->' +
|
||||
'Secuential Model->Functional Model->' +
|
||||
'Input Layer->Secuential Layer->Output Layer->'+
|
||||
|
||||
@@ -351,6 +351,30 @@
|
||||
"relatedUiObject": "Core API",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"disableIfPropertyIsDefined": true,
|
||||
"propertyToCheckFor": "optimizer",
|
||||
"label": "Add Optimizer",
|
||||
"relatedUiObject": "Optimizer",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"disableIfPropertyIsDefined": true,
|
||||
"propertyToCheckFor": "lossFunction",
|
||||
"label": "Add Loss Function",
|
||||
"relatedUiObject": "Loss Function",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"disableIfPropertyIsDefined": true,
|
||||
"propertyToCheckFor": "metrics",
|
||||
"label": "Add Metrics",
|
||||
"relatedUiObject": "Metrics",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Delete UI Object",
|
||||
"askConfirmation": true,
|
||||
@@ -383,10 +407,130 @@
|
||||
"name": "api",
|
||||
"type": "node",
|
||||
"childType": "Core API"
|
||||
},
|
||||
{
|
||||
"name": "optimizer",
|
||||
"type": "node",
|
||||
"childType": "Optimizer"
|
||||
},
|
||||
{
|
||||
"name": "lossFunction",
|
||||
"type": "node",
|
||||
"childType": "Loss Function"
|
||||
},
|
||||
{
|
||||
"name": "metrics",
|
||||
"type": "node",
|
||||
"childType": "Metrics"
|
||||
}
|
||||
],
|
||||
"icon": "tensorflow"
|
||||
},
|
||||
{
|
||||
"type": "Optimizer",
|
||||
"menuItems": [
|
||||
{
|
||||
"action": "Configure",
|
||||
"label": "Configure",
|
||||
"iconPathOn": "configuration",
|
||||
"iconPathOff": "configuration",
|
||||
"actionFunction": "uiObject.configEditor.activate"
|
||||
},
|
||||
{
|
||||
"action": "Delete UI Object",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Delete",
|
||||
"label": "Delete",
|
||||
"iconPathOn": "delete-entity",
|
||||
"iconPathOff": "delete-entity",
|
||||
"actionFunction": "payload.executeAction"
|
||||
}
|
||||
],
|
||||
"editors": {
|
||||
"config": true
|
||||
},
|
||||
"initialValues": {
|
||||
"config": "{ \n \"value\": \"sgd\"\n}"
|
||||
},
|
||||
"addLeftIcons": true,
|
||||
"level": 3,
|
||||
"attachingRules": {
|
||||
"compatibleTypes": "->Model->"
|
||||
},
|
||||
"propertyNameAtParent": "optimizer",
|
||||
"childrenNodesProperties": [],
|
||||
"icon": "tensorflow"
|
||||
},
|
||||
{
|
||||
"type": "Loss Function",
|
||||
"menuItems": [
|
||||
{
|
||||
"action": "Configure",
|
||||
"label": "Configure",
|
||||
"iconPathOn": "configuration",
|
||||
"iconPathOff": "configuration",
|
||||
"actionFunction": "uiObject.configEditor.activate"
|
||||
},
|
||||
{
|
||||
"action": "Delete UI Object",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Delete",
|
||||
"label": "Delete",
|
||||
"iconPathOn": "delete-entity",
|
||||
"iconPathOff": "delete-entity",
|
||||
"actionFunction": "payload.executeAction"
|
||||
}
|
||||
],
|
||||
"editors": {
|
||||
"config": true
|
||||
},
|
||||
"initialValues": {
|
||||
"config": "{ \n \"value\": \"categoricalCrossentropy\"\n}"
|
||||
},
|
||||
"addLeftIcons": true,
|
||||
"level": 3,
|
||||
"attachingRules": {
|
||||
"compatibleTypes": "->Model->"
|
||||
},
|
||||
"propertyNameAtParent": "lossFunction",
|
||||
"childrenNodesProperties": [],
|
||||
"icon": "tensorflow"
|
||||
},
|
||||
{
|
||||
"type": "Metrics",
|
||||
"menuItems": [
|
||||
{
|
||||
"action": "Configure",
|
||||
"label": "Configure",
|
||||
"iconPathOn": "configuration",
|
||||
"iconPathOff": "configuration",
|
||||
"actionFunction": "uiObject.configEditor.activate"
|
||||
},
|
||||
{
|
||||
"action": "Delete UI Object",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Delete",
|
||||
"label": "Delete",
|
||||
"iconPathOn": "delete-entity",
|
||||
"iconPathOff": "delete-entity",
|
||||
"actionFunction": "payload.executeAction"
|
||||
}
|
||||
],
|
||||
"editors": {
|
||||
"config": true
|
||||
},
|
||||
"initialValues": {
|
||||
"config": "{ \n \"value\": [\"accuracy\"]\n}"
|
||||
},
|
||||
"addLeftIcons": true,
|
||||
"level": 3,
|
||||
"attachingRules": {
|
||||
"compatibleTypes": "->Model->"
|
||||
},
|
||||
"propertyNameAtParent": "metrics",
|
||||
"childrenNodesProperties": [],
|
||||
"icon": "tensorflow"
|
||||
},
|
||||
{
|
||||
"type": "Layers API",
|
||||
"menuItems": [
|
||||
|
||||
+35
@@ -37,6 +37,7 @@ exports.newTensorFlowBotModulesTensorFlowLibrary = function (processIndex) {
|
||||
setupBackend()
|
||||
setupEnvironmentFlags()
|
||||
setupModel()
|
||||
compileModel()
|
||||
|
||||
callbackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_OK_RESPONSE)
|
||||
|
||||
@@ -235,6 +236,40 @@ exports.newTensorFlowBotModulesTensorFlowLibrary = function (processIndex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function compileModel() {
|
||||
if (learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.optimizer === undefined) {
|
||||
//TODO
|
||||
return
|
||||
}
|
||||
if (learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.optimizer.config.value === undefined) {
|
||||
//TODO
|
||||
return
|
||||
}
|
||||
if (learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.lossFunction === undefined) {
|
||||
//TODO
|
||||
return
|
||||
}
|
||||
if (learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.lossFunction.config.value === undefined) {
|
||||
//TODO
|
||||
return
|
||||
}
|
||||
if (learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.metrics === undefined) {
|
||||
//TODO
|
||||
return
|
||||
}
|
||||
if (learningSystem.machineLearningLibrary.typeOfLearning.typeOfModel.model.metrics.config.value === undefined) {
|
||||
//TODO
|
||||
return
|
||||
}
|
||||
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]
|
||||
}
|
||||
|
||||
tensorFlowModel.compile(compileArgs)
|
||||
}
|
||||
}
|
||||
|
||||
function finalize() {
|
||||
|
||||
Reference in new issue
Block a user