private void CheckChromosome() { if (Chromosome == null) { Chromosome = new float[LayersList.Sum(x => x.TotalParamCount)]; } }
private EvolvableNet(EvolvableNet other) : base(other) { Fitness = other.Fitness; Chromosome = new float[LayersList.Sum(x => x.TotalParamCount)]; other.Chromosome.CopyTo(Chromosome, 0); //clones have different IDs! Id = GetId(); }
public EvolvableNet(int xSize, int hSize, int ySize) : base(1, 1, new GruLayer <float>(xSize, hSize), new LinearLayer <float>(hSize, ySize), new SoftMaxLayer <float>(ySize)) { Chromosome = new float[LayersList.Sum(x => x.TotalParamCount)]; Id = GetId(); }