Exemple #1
0
        void InitUi()
        {
            var scse = (SimCliqueSetForEpoch)AppVm.Sim;
            var m = scse.CliqueNetworkTr.NodeGroups;

            CliqueEConfigVm = new CliqueEConfigVm
                (
                    gain: scse.UpdateParams.Gain,
                    stepSize: scse.UpdateParams.StepSize,
                    noiseLevel: scse.UpdateParams.NoiseLevel
                );

            NodeCount = m.RowCount;
            GroupCount = m.ColumnCount;
            MemCount = scse.Memories.ColumnCount;
            //CliqueEConfigVm.Gain = scse.UpdateParams.Gain;
            //CliqueEConfigVm.StepSize = scse.UpdateParams.StepSize;
            //CliqueEConfigVm.NoiseLevel = scse.UpdateParams.NoiseLevel;
        }
Exemple #2
0
 void ConfigChanged(CliqueEConfigVm cliqueEConfigVm)
 {
     OnPropertyChanged("UpdateCommand");
 }
Exemple #3
0
        private void DoUpdate()
        {
            var scse = (SimCliqueSetForEpoch)AppVm.Sim;
            var wak = new CliqueUpdateParams(
                    nodeGroupSynapses: scse.UpdateParams.NodeGroupSynapses,
                    gain: CliqueEConfigVm.Gain,
                    stepSize: CliqueEConfigVm.StepSize,
                    randSeed: MersenneTwister.Default.Next(),
                    noiseLevel: CliqueEConfigVm.NoiseLevel,
                    epochs: AppVm.Current.ReportFreq
                );

            CliqueEConfigVm = new CliqueEConfigVm
            (
                gain: CliqueEConfigVm.Gain,
                stepSize: CliqueEConfigVm.StepSize,
                noiseLevel: CliqueEConfigVm.NoiseLevel
            );

            var result = AppVm.Sim.SetParams(wak);
            if (result.IsSuccess)
            {
                AppVm.SimRunner.Stop();
                AppVm.SetSim(Rop.ExtractResult(result).Value);
                AppVm.Run();
                return;
            }

            AppVm.UpdateError(Rop.ExtractErrorMessage(result).Value[0]);
        }