layer.cs
来自「AI Life (Neural Networks, Genetic Algori」· CS 代码 · 共 39 行
CS
39 行
using System;
namespace AI_Life
{
public class Layer
{
//=========================================================//
int numNeurons; // number of neurons
int inputsPerNeuron; // number of inputs per neuron
Neuron[] neurons; // neuron array
public Layer(int initNumNeurons, int initInputsPerNeuron)
{
numNeurons = initNumNeurons;
inputsPerNeuron = initInputsPerNeuron;
neurons = new Neuron[numNeurons];
for (int i=0; i<numNeurons; i++)
neurons[i] = new Neuron(inputsPerNeuron);
}
public Neuron Neuron(int index)
{
return neurons[index];
}
public int NumNeurons
{
get
{
return numNeurons;
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?