public void Update(NnGpuWin nnGpuWinInstance, int layerIndex) { NnGpuLayerDataGroup laterDataGroup = nnGpuWinInstance.GetLayerData(layerIndex); NnGpuLayerData layerData = laterDataGroup.GetLayerOfType(NnGpuLayerDataType.Forward); BitmapSource image = layerData.ToImage(); layerInputImg.Source = image; }
public void Update(NnGpuWin nnGpuWinInstance, int layerIndex) { uint averageTimeMs = 0; double averageBytes = 0; nnGpuWinInstance.GetLayerPerformanceData(layerIndex, out averageTimeMs, out averageBytes); NnGpuLayerDataGroup laterDataGroup = nnGpuWinInstance.GetLayerData(layerIndex); BackwardSum = "Sum: " + laterDataGroup.GetLayerOfType(NnGpuLayerDataType.Backward).Sum(); ForwardSum = "Sum: " + laterDataGroup.GetLayerOfType(NnGpuLayerDataType.Forward).Sum(); double largest = laterDataGroup.GetLayerOfType(NnGpuLayerDataType.Forward).GetLargestDataValue(); double smallest = laterDataGroup.GetLayerOfType(NnGpuLayerDataType.Forward).GetSmallestDataValue(); ImageContainer.Children.Clear(); BackwardImageContainer.Children.Clear(); NnGpuLayerData forward = laterDataGroup.GetLayerOfType(NnGpuLayerDataType.Forward); BitmapSource imageSource = forward.ToImage(); Image image = new Image(); //image.Width = 25 * forward.depth; image.Height = 25; image.Stretch = Stretch.Fill; image.Source = imageSource; ImageContainer.Children.Add(image); NnGpuLayerData backward = laterDataGroup.GetLayerOfType(NnGpuLayerDataType.Backward); BitmapSource backwardImageSource = backward.ToDepthImage(); Image backwardImage = new Image(); backwardImage.Width = 25 * backward.depth; backwardImage.Height = 25; backwardImage.Stretch = Stretch.Fill; backwardImage.Source = backwardImageSource; BackwardImageContainer.Children.Add(backwardImage); }