Multilayer neuron network
This commit is contained in:
@@ -30,6 +30,8 @@ const props = defineProps<{
|
||||
datasets: Dataset[];
|
||||
selectedDataset: string;
|
||||
initializationMethod: InitializationMethod;
|
||||
hiddenLayers: number;
|
||||
hiddenLayersNeurons: number;
|
||||
minError: number;
|
||||
defaultLearningRate: number;
|
||||
sessionId: string;
|
||||
@@ -38,6 +40,8 @@ const props = defineProps<{
|
||||
|
||||
const selectedDatasetCopy = ref(props.selectedDataset);
|
||||
const selectedMethod = ref(props.initializationMethod);
|
||||
const hiddenLayers = ref(props.hiddenLayers);
|
||||
const hiddenLayersNeurons = ref(props.hiddenLayersNeurons);
|
||||
const minError = ref(props.minError);
|
||||
const learningRate = ref(props.defaultLearningRate);
|
||||
const maxIterations = ref(props.defaultMaxIterations);
|
||||
@@ -59,6 +63,9 @@ watch(selectedDatasetCopy, (newvalue) => {
|
||||
}
|
||||
// MaxIterations
|
||||
maxIterations.value = props.defaultMaxIterations;
|
||||
if (selectedDatasetCopy && selectedDatasetCopy.defaultMaxIterations !== undefined) {
|
||||
maxIterations.value = selectedDatasetCopy.defaultMaxIterations;
|
||||
}
|
||||
})
|
||||
|
||||
const trainingId = ref<string>('');
|
||||
@@ -82,6 +89,8 @@ function startTraining() {
|
||||
type: props.type,
|
||||
dataset: selectedDatasetCopy.value,
|
||||
weight_init_method: selectedMethod.value,
|
||||
hidden_layers: hiddenLayers.value,
|
||||
hidden_layers_neurons: hiddenLayersNeurons.value,
|
||||
min_error: minError.value,
|
||||
learning_rate: learningRate.value,
|
||||
session_id: props.sessionId,
|
||||
@@ -158,7 +167,7 @@ watch(selectedDatasetCopy, (newValue) => {
|
||||
class="cursor-pointer"
|
||||
>
|
||||
<NativeSelectOption
|
||||
v-for="method in ['zeros', 'random']"
|
||||
v-for="method in (props.type == 'multilayer' ? ['random'] : ['zeros', 'random'])"
|
||||
v-bind:key="method"
|
||||
:value="method"
|
||||
>
|
||||
@@ -169,6 +178,42 @@ watch(selectedDatasetCopy, (newValue) => {
|
||||
</FormItem>
|
||||
</FormField>
|
||||
|
||||
<!-- HIDDEN LAYERS -->
|
||||
<FormField name="hidden_layers" v-if="props.type === 'multilayer'">
|
||||
<FormItem>
|
||||
<FormLabel>Nombre de couches cachées</FormLabel>
|
||||
<FormControl>
|
||||
<!-- TODO : MAX input -->
|
||||
<Input
|
||||
type="number"
|
||||
v-model="hiddenLayers"
|
||||
min="1"
|
||||
max="5"
|
||||
step="1"
|
||||
class="w-min"
|
||||
/>
|
||||
</FormControl>
|
||||
</FormItem>
|
||||
</FormField>
|
||||
|
||||
<!-- HIDDEN LAYERS NEURONS -->
|
||||
<FormField name="hidden_layers_neurons" v-if="props.type === 'multilayer'">
|
||||
<FormItem>
|
||||
<FormLabel>Nombre de neurones par couche cachée</FormLabel>
|
||||
<FormControl>
|
||||
<!-- TODO : MAX input -->
|
||||
<Input
|
||||
type="number"
|
||||
v-model="hiddenLayersNeurons"
|
||||
min="1"
|
||||
max="5"
|
||||
step="1"
|
||||
class="w-min"
|
||||
/>
|
||||
</FormControl>
|
||||
</FormItem>
|
||||
</FormField>
|
||||
|
||||
<!-- MIN ERROR -->
|
||||
<FormField name="min_error" v-if="props.type !== 'simple'">
|
||||
<FormItem>
|
||||
@@ -210,6 +255,7 @@ watch(selectedDatasetCopy, (newValue) => {
|
||||
type="number"
|
||||
v-model="maxIterations"
|
||||
min="0"
|
||||
max="5000"
|
||||
step="1"
|
||||
class="w-min"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user