From 2fbc26bb36c79c9b86a8eb9818b85b1c52a16159 Mon Sep 17 00:00:00 2001 From: Danijel Anđelković Date: Tue, 3 May 2022 21:24:20 +0200 Subject: Ispravio bug gde se graf nije prikazivao dok se strane ne resize-uje. --- .../_elements/form-model/form-model.component.html | 341 +++++++++++---------- .../_elements/form-model/form-model.component.ts | 14 +- 2 files changed, 178 insertions(+), 177 deletions(-) (limited to 'frontend/src/app/_elements/form-model') 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 e51c2cac..fa57ad46 100644 --- a/frontend/src/app/_elements/form-model/form-model.component.html +++ b/frontend/src/app/_elements/form-model/form-model.component.html @@ -1,219 +1,220 @@ -
-
+
+
+
+ +
+ + Naziv + + +
+
+ + Tip problema + + + {{ optionName }} + + + +
+ +
+ +
+ + Optimizacija + + + {{ optionName }} + + + + +
+
+ + Funkcija troška + + + {{ optionName }} + + + +
+ +
+ +
+ + Funkcija aktivacije izlaznog sloja + + + {{ optionName }} + + + +
+
+ + Stopa učenja + + + {{ optionName }} + + + +
+ +
+ +
+ + Broj epoha + + +
+
+ + Broj uzoraka po iteraciji + + + {{option}} + + +
-
- - Naziv - -
-
- - Tip problema - - - {{ optionName }} - - - +
+
+
+
+ +
{{testSetDistribution}}% : {{100-testSetDistribution}}%
+
Trening + + Test
+ +
+
+ Nasumični redosled podataka +
+ +
+
-
+ +
+
+ +
+
-
- - Optimizacija - - - {{ optionName }} - - +
+
Broj Skrivenih Slojeva
+ +
{{newModel.hiddenLayers}}
+ -
+
- Funkcija troška - - + Aktivaciona funkcija svih slojeva + + + {{ optionName }}
-
-
- Funkcija aktivacije izlaznog sloja - - - {{ optionName }} - - + Broj neurona svih slojeva +
+
- Stopa učenja - - + Regularizacija svih slojeva + + {{ optionName }}
-
-
- Broj epoha - - -
-
- - Broj uzoraka po iteraciji - - - {{option}} + Stopa regularizacije svih slojeva + + + {{ optionName }} +
-
-
-
-
-
- -
{{testSetDistribution}}% : {{100-testSetDistribution}}%
-
Trening - - Test
- -
-
- Nasumični redosled podataka -
-
-
- - -
-
- -
-
- -
-
Broj Skrivenih Slojeva
- -
{{newModel.hiddenLayers}}
- - -
-
-
- - Aktivaciona funkcija svih slojeva - - - - {{ optionName }} - - - -
- -
- - Broj neurona svih slojeva - - -
-
-
- - Regularizacija svih slojeva - - - {{ optionName }} - - - -
- -
- - Stopa regularizacije svih slojeva - - - {{ optionName }} - - - -
- - -
- -
+ +
-
+
- - Aktivacija - - - - {{ optionName }} - - - - -
-
Broj čvorova
- -
{{newModel.layers[i].neurons}}
- -
+
- - Regularizacija - - - {{ optionName }} - - - - - - Stopa regularizacije - - - {{ optionName }} - - - -
-
+ + Regularizacija + + + {{ optionName }} + + + + + Stopa regularizacije + + + {{ optionName }} + + + +
+
+
\ No newline at end of file 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 d5c497aa..ef456547 100644 --- a/frontend/src/app/_elements/form-model/form-model.component.ts +++ b/frontend/src/app/_elements/form-model/form-model.component.ts @@ -13,13 +13,12 @@ import { MatSliderChange } from '@angular/material/slider'; }) export class FormModelComponent implements AfterViewInit { @ViewChild(GraphComponent) graph!: GraphComponent; - @Input() forExperiment?: Experiment; + @Input() forExperiment!: Experiment; @Output() selectedModelChangeEvent = new EventEmitter(); testSetDistribution: number = 70; constructor() { } - ngAfterViewInit(): void { - } + ngAfterViewInit(): void { } selectFormControl = new FormControl('', Validators.required); nameFormControl = new FormControl('', [Validators.required, Validators.email]); @@ -34,8 +33,7 @@ export class FormModelComponent implements AfterViewInit { selectRegularisationFormControl = new FormControl('', Validators.required); selectRRateFormControl = new FormControl('', Validators.required); - newModel: Model = new Model(); - myModels?: Model[]; + newModel!: Model; selectedModel?: Model; @@ -57,7 +55,9 @@ export class FormModelComponent implements AfterViewInit { selectedMetrics = []; lossFunction: any = LossFunction; - showMyModels: boolean = true; + loadModel(model: Model) { + this.newModel = model; + } updateGraph() { //console.log(this.newModel.layers); @@ -121,7 +121,6 @@ export class FormModelComponent implements AfterViewInit { } } changeAllRegularisationRate() { - for (let i = 0; i < this.newModel.layers.length; i++) { this.newModel.layers[i].regularisationRate = this.selectedRegularisationRate; } @@ -132,6 +131,7 @@ export class FormModelComponent implements AfterViewInit { this.updateGraph(); } } + updateTestSet(event: MatSliderChange) { this.testSetDistribution = event.value!; } -- cgit v1.2.3