diff options
author | TAMARA JERINIC <tamara.jerinic@gmail.com> | 2022-04-25 03:40:36 +0200 |
---|---|---|
committer | TAMARA JERINIC <tamara.jerinic@gmail.com> | 2022-04-25 03:40:36 +0200 |
commit | 044ef1a76cf2f53b0dd86c4a77fabd01a81e93ad (patch) | |
tree | 4f24f28289fae2b8e7bfa379fd8562837510deda /frontend/src/app/_elements/hidden-layer | |
parent | aee2cd43578a255f5a0e346ac8955f663a673cca (diff) |
Ažurirane komponente form-model i hidden-layer.
Diffstat (limited to 'frontend/src/app/_elements/hidden-layer')
3 files changed, 30 insertions, 13 deletions
diff --git a/frontend/src/app/_elements/hidden-layer/hidden-layer.component.css b/frontend/src/app/_elements/hidden-layer/hidden-layer.component.css index c8db6056..dd96e0c5 100644 --- a/frontend/src/app/_elements/hidden-layer/hidden-layer.component.css +++ b/frontend/src/app/_elements/hidden-layer/hidden-layer.component.css @@ -1,5 +1,17 @@ .container{ - max-width: 15rem; + + text-align: justify; border: 1px solid white; border-radius: 5px; + padding: 0; + color: white!important; + background-color: var(--ns-bg-dark-100) !important; + } +mat-form-field{ + font-size: 10px; +} +input{ + background-color: #004165; + color: aliceblue; +}
\ No newline at end of file diff --git a/frontend/src/app/_elements/hidden-layer/hidden-layer.component.html b/frontend/src/app/_elements/hidden-layer/hidden-layer.component.html index 65e0f626..16c41b28 100644 --- a/frontend/src/app/_elements/hidden-layer/hidden-layer.component.html +++ b/frontend/src/app/_elements/hidden-layer/hidden-layer.component.html @@ -1,39 +1,42 @@ <div class="container"> + <div> + <label>Skriveni sloj {{hiddenLayerNum}}</label> + </div> <mat-form-field appearance="fill"> <mat-label>Aktivaciona funkcija</mat-label> - <mat-select matNativeControl required [formControl]="selectFormControl"> - <mat-option label="--select something --"></mat-option> + <mat-select matNativeControl required [formControl]="selectActivationFormControl"> <mat-option value="saab">Relu</mat-option> <mat-option value="mercedes">Sigmoid</mat-option> <mat-option value="audi">Softmax</mat-option> </mat-select> - <mat-error *ngIf="selectFormControl.hasError('required')"> + <mat-error *ngIf="selectActivationFormControl.hasError('required')"> Obavezno polje </mat-error> </mat-form-field> <br> - Broj čvorova: <input type="number" min="1" class="form-control" name="hiddenLayersNeurons"> +<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> <br> <mat-form-field appearance="fill"> <mat-label>Regularizacija</mat-label> - <mat-select matNativeControl required [formControl]="selectFormControl"> - <mat-option label="--select something --"></mat-option> + <mat-select matNativeControl required [formControl]="selectRegularisationFormControl"> <mat-option value="l1">L1</mat-option> <mat-option value="l2">L2</mat-option> </mat-select> - <mat-error *ngIf="selectFormControl.hasError('required')"> + <mat-error *ngIf="selectRegularisationFormControl.hasError('required')"> Obavezno polje </mat-error> </mat-form-field> <br> <mat-form-field appearance="fill"> <mat-label>Stopa regularizacije</mat-label> - <mat-select matNativeControl required [formControl]="selectFormControl"> + <mat-select matNativeControl required [formControl]="selectRRateFormControl"> <mat-option value="saab">0.001</mat-option> <mat-option value="mercedes">0.01</mat-option> <mat-option value="audi">0.1</mat-option> </mat-select> - <mat-error *ngIf="selectFormControl.hasError('required')"> + <mat-error *ngIf="selectRRateFormControl.hasError('required')"> Obavezno polje </mat-error> </mat-form-field> diff --git a/frontend/src/app/_elements/hidden-layer/hidden-layer.component.ts b/frontend/src/app/_elements/hidden-layer/hidden-layer.component.ts index fa9a1114..301476de 100644 --- a/frontend/src/app/_elements/hidden-layer/hidden-layer.component.ts +++ b/frontend/src/app/_elements/hidden-layer/hidden-layer.component.ts @@ -1,16 +1,18 @@ import { Component, OnInit } from '@angular/core'; import { FormControl, Validators } from '@angular/forms'; - +import Model from 'src/app/_data/Model'; @Component({ selector: 'app-hidden-layer', templateUrl: './hidden-layer.component.html', styleUrls: ['./hidden-layer.component.css'] }) export class HiddenLayerComponent implements OnInit { - + hiddenLayerNum:number=1; constructor() { } ngOnInit(): void { } - selectFormControl = new FormControl('', Validators.required); + selectActivationFormControl = new FormControl('', Validators.required); + selectRegularisationFormControl = new FormControl('', Validators.required); + selectRRateFormControl = new FormControl('', Validators.required); } |