コード例 #1
0
        public static Network Build(int inputNodes, LayerOptions outputLayerOptions, LayerOptions[] hiddenLayerOptions, int?randomSeed)
        {
            var currentInput = inputNodes;

            var layers = new List <Layer>();

            foreach (var hiddenLayerOption in hiddenLayerOptions)
            {
                var layer = new Layer(currentInput, hiddenLayerOption.OutputNodes, hiddenLayerOption.ActivationFunction, randomSeed);

                layers.Add(layer);

                currentInput = hiddenLayerOption.OutputNodes;
            }

            var lastLayer = new Layer(currentInput, outputLayerOptions.OutputNodes, outputLayerOptions.ActivationFunction, randomSeed);

            layers.Add(lastLayer);

            return(new Network(layers));
        }
コード例 #2
0
 internal CloudLayer(IntPtr handle, LayerOptions opt)
 {
     this.NativeHandle = handle;
     this.options      = opt;
 }
コード例 #3
0
 internal CloudLayer(IntPtr handle, LayerOptions opt)
 {
     this.NativeHandle = handle;
     this.options = opt;
 }
コード例 #4
0
ファイル: D2DLib.cs プロジェクト: jingwood/d2dlib
 public static extern HANDLE PushLayer(HANDLE ctx, HANDLE layerHandle, ref D2DRect contentBounds,
                                       [In, Optional] HANDLE geometryHandle, [In, Optional] HANDLE opacityBrush,
                                       LayerOptions layerOptions = LayerOptions.InitializeForClearType);