Multilayer neuron network
linter / quality (push) Successful in 7m10s
tests / ci (8.4) (push) Successful in 4m43s
tests / ci (8.5) (push) Successful in 4m47s

This commit is contained in:
2026-09-08 16:29:02 +02:00
parent 2f4db07918
commit 08aa04fe56
17 changed files with 630 additions and 50 deletions
+16 -7
View File
@@ -6,6 +6,7 @@ const props = defineProps<{
iterations: Iteration[];
trainingEnded: boolean;
trainingEndReason: string;
maxDisplayedWeights: number;
}>();
// All weight in a simple array
@@ -16,6 +17,12 @@ const allWeightPerIteration: ComputedRef<number[][]> = computed(() => {
});
});
const displayedWeights = computed(() => {
const weights = allWeightPerIteration.value.find((weights) => weights.length > 0) || [];
return weights.length <= props.maxDisplayedWeights ? weights : [];
});
const rowBgDark = computed(() => {
let isEven = false;
return props.iterations.map((iteration, index, arr) => {
@@ -33,7 +40,7 @@ const rowBgDark = computed(() => {
<th>Époch</th>
<th>Exemple</th>
<th
v-for="(weight, index) in allWeightPerIteration[0]"
v-for="(weight, index) in displayedWeights"
v-bind:key="index"
>
X<sub>{{ index }}</sub>
@@ -49,12 +56,14 @@ const rowBgDark = computed(() => {
>
<td>{{ iteration.epoch }}</td>
<td>{{ iteration.exampleIndex }}</td>
<td
v-for="(weight, index) in allWeightPerIteration[index]"
v-bind:key="index"
>
{{ weight.toFixed(2) }}
</td>
<template v-if="displayedWeights.length > 0">
<td
v-for="(weight, weightIndex) in allWeightPerIteration[index]"
v-bind:key="weightIndex"
>
{{ weight.toFixed(2) }}
</td>
</template>
<td>{{ iteration.error.toFixed(2) }}</td>
</tr>