示例#1
0
    Layer createHiddenLayer(HiddenTemplate template, float x, float y)
    {
        Layer thisLayer = new Layer(template.numNormalNodes, template.numHorizontallyFlippedNodes, template.numVerticallyFlippedNodes,
                                    template.numClockwiseNodes, template.numCounterClockNodes, x, y, currentLayerNumber);

        return(thisLayer);
    }
示例#2
0
    public Level(Texture2D[] inputTextures, Vector2 inputPostion, HiddenTemplate[] hiddenTemplates,
                 Vector2[] HiddenPostions, Vector2 outputPostion, Texture2D target)
    {
        int currentLayerNumber = 0;

        inputLayer   = new Layer(inputTextures, inputPostion.x, inputPostion.y, currentLayerNumber);
        hiddenLayers = new Layer[hiddenTemplates.Length];

        for (int i = 0; i < hiddenTemplates.Length; i++)
        {
            currentLayerNumber++;
            HiddenTemplate template = hiddenTemplates[i];
            Vector2        postion  = HiddenPostions[i];
            hiddenLayers[i] = new Layer(template.numNormalNodes, template.numHorizontallyFlippedNodes, template.numVerticallyFlippedNodes,
                                        template.numClockwiseNodes, template.numCounterClockNodes, postion.x, postion.y, currentLayerNumber);
        }

        currentLayerNumber++;
        outputLayer = new Layer(outputPostion.x, outputPostion.y, currentLayerNumber);
        outputNode  = outputLayer.get_ith_node(0);

        goal = new Node[] { new Node(target) };
    }