public TrainingViewModel(ILearningManager learningManager, IEventAggregator eventAggregator, ISaveFileReader sfr) { _learningManager = learningManager; _eventAggregator = eventAggregator; _sfr = sfr; TrainForOneEpochCommand = new DelegateCommand(TrainForOneEpoch); QuickStepsCommand = new DelegateCommand <int?>(TrainForManyEpochs); InitializeWeightsCommand = new DelegateCommand(InitializeWeights); StartAutoTrainCommand = new DelegateCommand(StartAutoTrain); StopAutoTrainCommand = new DelegateCommand(StopAutoTrain); ConfigurePlots(); Speed = 1; ActivationFunctions = new() { new SigmoidActivationFunction(), new SigmoidBipolarActivationFunction(), new TanhActivationFunction(), }; _eventAggregator.GetEvent <TrainingDatasetChangedEvent>().Subscribe(UpdateTrainingDataset); _eventAggregator.GetEvent <NeuralNetworkChangedEvent>().Subscribe(UpdateNetwork); _eventAggregator.GetEvent <SaveButtonClickedEvent>().Subscribe(SaveNetwork); _eventAggregator.GetEvent <TrainingConfigUpdateEvent>().Subscribe(UpdateTrainingProperties); _learningManager.ActivationFunction = new SigmoidActivationFunction(); _learningManager.LearningRate = 0.1; _eventAggregator.GetEvent <RequestNeuralNetworkUpdate>().Publish(); _eventAggregator.GetEvent <RequestDatasetUpdate>().Publish(); }
public SaveFileController( ILogger <SaveFileController> logger, ISaveFileReader saveFileReader ) { _logger = logger; _saveFileReader = saveFileReader; }
public MainWindowViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, ISaveFileReader sfr) { _regionManager = regionManager; _eventAggregator = eventAggregator; _sfr = sfr; CloseWindowCommand = new DelegateCommand <Window>(CloseWindow); MaximizeWindowCommand = new DelegateCommand <Window>(MaximizeWindow); MinimizeWindowCommand = new DelegateCommand <Window>(MinimizeWindow); SaveCommand = new DelegateCommand(() => _eventAggregator.GetEvent <SaveButtonClickedEvent>().Publish()); LoadCommand = new DelegateCommand(LoadNetwork); NavigateCommand = new DelegateCommand <string>(Navigate); _regionManager.RegisterViewWithRegion("ContentRegion", typeof(HomeView)); _regionManager.RegisterViewWithRegion("ContentRegion", typeof(DataView)); _regionManager.RegisterViewWithRegion("ContentRegion", typeof(DesignView)); _regionManager.RegisterViewWithRegion("ContentRegion", typeof(TrainingView)); }