aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app
diff options
context:
space:
mode:
authorOgnjen Cirkovic <ciraboxkg@gmail.com>2022-06-06 03:45:11 +0200
committerOgnjen Cirkovic <ciraboxkg@gmail.com>2022-06-06 03:45:11 +0200
commit67151f6cc5fcb9a66fc08a181eb8e1a6acaca733 (patch)
tree8381806c8cc663b35edb3f8a42ffef774c1192fc /frontend/src/app
parent2a9823c8f24fca0db3782131dc2f5cfbc452d3d4 (diff)
Popravljena console greska pri pravljenju modela , ucitavanju eksperimenta, ucitavanju treniranog modela. Popravljena greska pri crtanju grafa.
Diffstat (limited to 'frontend/src/app')
-rw-r--r--frontend/src/app/_elements/form-model/form-model.component.html2
-rw-r--r--frontend/src/app/_elements/form-model/form-model.component.ts15
2 files changed, 10 insertions, 7 deletions
diff --git a/frontend/src/app/_elements/form-model/form-model.component.html b/frontend/src/app/_elements/form-model/form-model.component.html
index 55c802e9..1f0208fa 100644
--- a/frontend/src/app/_elements/form-model/form-model.component.html
+++ b/frontend/src/app/_elements/form-model/form-model.component.html
@@ -1,4 +1,4 @@
-<div *ngIf="newModel">
+<div *ngIf="newModel!=undefined">
<div id="container">
<div class="ns-row">
diff --git a/frontend/src/app/_elements/form-model/form-model.component.ts b/frontend/src/app/_elements/form-model/form-model.component.ts
index f72ce6de..7831f573 100644
--- a/frontend/src/app/_elements/form-model/form-model.component.ts
+++ b/frontend/src/app/_elements/form-model/form-model.component.ts
@@ -27,11 +27,7 @@ export class FormModelComponent implements AfterViewInit {
@Output() editEvent = new EventEmitter();
ngAfterViewInit(): void {
- this.lossFunction = this.lossFunctions[this.forProblemType][0];
- this.outputLayerActivationFunction = this.outputLayerActivationFunctions[this.forProblemType][0];
-
- this.newModel.lossFunction = this.lossFunction;
- this.newModel.outputLayerActivationFunction = this.outputLayerActivationFunction;
+
}
selectFormControl = new FormControl('', Validators.required);
@@ -82,10 +78,17 @@ export class FormModelComponent implements AfterViewInit {
loadModel(model: Model) {
this.newModel = model;
this.forProblemType = model.type;
+ this.lossFunction = this.lossFunctions[this.forProblemType][0];
+ this.outputLayerActivationFunction = this.outputLayerActivationFunctions[this.forProblemType][0];
+
+ this.newModel.lossFunction = this.lossFunction;
+ this.newModel.outputLayerActivationFunction = this.outputLayerActivationFunction;
+ this.updateGraph();
}
updateGraph() {
- this.graph.update();
+ if(this.newModel)
+ this.graph.update();
}
removeLayer() {