Exemplo n.º 1
0
        public ChistaNetLine(NeuralNetworkLineImage line_image)
        {
            if (line_image == null)
            {
                throw new ArgumentNullException(nameof(line_image), "The nn-line-image is undefined.");
            }

            chista_nets = new ChistaNet[line_image.images.Length];

            int i = 0;

            foreach (var image in line_image.images)
            {
                chista_nets[i++] = new ChistaNet(image);
            }

            combiners = line_image.combiners;
        }
Exemplo n.º 2
0
        public IChistaNet ChistaNet(double learning, double certainty, double dropout)
        {
            var image = Image();

            return(image switch
            {
                NeuralNetworkImage simple_image =>
                new ChistaNet(simple_image)
                {
                    LearningFactor = learning,
                    CertaintyFactor = certainty,
                    DropoutFactor = dropout
                },
                NeuralNetworkLineImage line_image =>
                new ChistaNetLine(line_image)
                {
                    LearningFactor = learning,
                    CertaintyFactor = certainty,
                    DropoutFactor = dropout
                },
                _ => throw new Exception("Invalid chista-net type"),
            });