/// <summary> /// This wipes out everything (call this when loading a new session) /// </summary> public void Clear() { _network = null; _networkInputs = null; _networkOutputs = null; _vectorImages.Clear(); if (_dots != null) { _viewport.Children.Remove(_dots.Visual); _dots = null; } }
public void NetworkChanged(TrainedNework_Simple network) { _network = new Network(network); // Detect input size change if (_networkInputs == null || _networkInputs.Size != network.InputSize) { _networkInputs = new NetworkInputs(network.InputSize); } // Detect output size change if (_networkOutputs == null || !_networkOutputs.IsSame(network.Outputs)) { _networkOutputs = new NetworkOutputs(network.Outputs); BuildLegend(_networkOutputs.Names, _networkOutputs.Hues); } #region Dots if (_dots == null) { EnsureDotsCreated(); } else { _dots.Distances_Input.Clear(); _dots.Distances_Output.Clear(); // Clear foreach (Dot dot in _dots.Dots) { dot.NNInput = null; dot.NNOutput = null; } // Rebuild foreach (Dot dot in _dots.Dots) { ReconstructDot(dot); } } #endregion }