Skip to content

Commit

Permalink
feat(select-card): color the cell in red for out-of-bounds values (-1…
Browse files Browse the repository at this point in the history
…, 1) for `weight` and `bias`
  • Loading branch information
bamdadfr committed Nov 17, 2021
1 parent 06632de commit 4c2b36d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/ui/select-card.ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,22 @@ selectCardUi.attachSourceRegularizationRatesEvents = function () {

selectCardUi.updateSourceWeight = function (index, weight?) {
this.updateSourceInput (this.weights, index, weight);
if (weight > 1 || weight < -1) {
this.weights[index].style.backgroundColor = 'rgba(255,0,0,.2)';
}
else {
this.weights[index].style.backgroundColor = null;
}
};

selectCardUi.updateSourceBias = function (index, bias?) {
this.updateSourceInput (this.biases, index, bias);
if (bias > 1 || bias < -1) {
this.biases[index].style.backgroundColor = 'rgba(255,0,0,.2)';
}
else {
this.biases[index].style.backgroundColor = null;
}
};

selectCardUi.updateSourceLearningRate = function (index, learningRate?) {
Expand Down

0 comments on commit 4c2b36d

Please sign in to comment.