aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements
diff options
context:
space:
mode:
authorTAMARA JERINIC <tamara.jerinic@gmail.com>2022-04-25 13:05:47 +0200
committerTAMARA JERINIC <tamara.jerinic@gmail.com>2022-04-25 13:05:47 +0200
commitf20f77226f0106ed2c9e2bb7b49550f5e5eb4c50 (patch)
treee08fae17dfbeb801526ca2f31503816957db45f4 /frontend/src/app/_elements
parentfd8abefd0caed47b7e3d7dd0abf10e747a18f82e (diff)
Ažurirana komponenta form-model, dodata mogućnost iscrtavanja kartica za skrivene slojeve u zavisnosti od broja slojeva.
Diffstat (limited to 'frontend/src/app/_elements')
-rw-r--r--frontend/src/app/_elements/form-model/form-model.component.css2
-rw-r--r--frontend/src/app/_elements/form-model/form-model.component.html22
-rw-r--r--frontend/src/app/_elements/form-model/form-model.component.ts4
3 files changed, 19 insertions, 9 deletions
diff --git a/frontend/src/app/_elements/form-model/form-model.component.css b/frontend/src/app/_elements/form-model/form-model.component.css
index b4477bce..f4d085ea 100644
--- a/frontend/src/app/_elements/form-model/form-model.component.css
+++ b/frontend/src/app/_elements/form-model/form-model.component.css
@@ -34,6 +34,8 @@ mat-icon{
padding: 0;
color: white!important;
background-color: var(--ns-bg-dark-100) !important;
+ min-width: none;
+ max-width: 12.5rem;
}
mat-form-field{
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 7d669d1d..0b63c5ac 100644
--- a/frontend/src/app/_elements/form-model/form-model.component.html
+++ b/frontend/src/app/_elements/form-model/form-model.component.html
@@ -124,13 +124,15 @@
</div>
</div>
<hr>
- <div class="row">
+ <div class="row" style="max-width:60rem ;">
- <div class="col text-center" *ngFor="let item of [1,2,3,4,5]">
+ <div class="col text-center" *ngFor="let item of numSequence(newModel.hiddenLayers)" >
+ {{item}}
<div class="neuron">
- <div>
- <label>Skriveni sloj {{item}}</label>
+ <div style="text-align: center;">
+ <label >Skriveni sloj</label>
</div>
+ <div class="row" style="margin-bottom: -10px;">
<mat-form-field appearance="fill">
<mat-label>Aktivaciona funkcija</mat-label>
<mat-select matNativeControl required [formControl]="selectActivationFormControl">
@@ -142,17 +144,15 @@
Obavezno polje
</mat-error>
</mat-form-field>
- <br>
+ </div>
<div class="row" >
- <!--<label style="width: 7rem;" for="hiddenLayersNeurons">Broj čvorova:</label> <input type="number" min="1" class="form-control" name="hiddenLayersNeurons" style="max-width: 5rem;">-->
-
<div class="col-6" style="font-size: 13px;" >Broj čvorova</div>
<mat-icon (click)="addNeuron()">add_circle</mat-icon>
<div class="col-1">{{newModel.hiddenLayerNeurons}}</div>
<mat-icon (click)="removeNeuron()">remove_circle</mat-icon>
</div>
- <br>
+ <div class='row' style="margin-bottom: -7px;">
<mat-form-field appearance="fill">
<mat-label>Regularizacija</mat-label>
<mat-select matNativeControl required [formControl]="selectRegularisationFormControl">
@@ -163,7 +163,8 @@
Obavezno polje
</mat-error>
</mat-form-field>
- <br>
+ </div>
+ <div class="row" style="margin-bottom: -7px;">
<mat-form-field appearance="fill">
<mat-label>Stopa regularizacije</mat-label>
<mat-select matNativeControl required [formControl]="selectRRateFormControl">
@@ -175,6 +176,9 @@
Obavezno polje
</mat-error>
</mat-form-field>
+ </div>
</div>
+ <br>
</div>
+
</div> \ 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 cff967aa..b1d0a2a9 100644
--- a/frontend/src/app/_elements/form-model/form-model.component.ts
+++ b/frontend/src/app/_elements/form-model/form-model.component.ts
@@ -54,6 +54,7 @@ export class FormModelComponent implements OnInit {
showMyModels: boolean = true;
+ hiddenLayers=[];
@@ -136,6 +137,9 @@ export class FormModelComponent implements OnInit {
this.newModel.hiddenLayerNeurons[i]=1;
}
}*/
+ numSequence(n: number): Array<number> {
+ return Array(n);
+ }
removeNeuron(){
if(this.newModel.hiddenLayerNeurons>1)
{