Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant dendrite object created #2

Open
Dungyichao opened this issue Jun 20, 2019 · 0 comments
Open

Redundant dendrite object created #2

Dungyichao opened this issue Jun 20, 2019 · 0 comments

Comments

@Dungyichao
Copy link

Dungyichao commented Jun 20, 2019

In line 297, you create dendrite object for NeuralLayer connectingFrom, however, I think that is redundant. In the Neuron class, there is already a dendrite object declared, so there is no need to declare another one in line 297. Thank you.

private void CreateNetwork(NeuralLayer connectingFrom, NeuralLayer connectingTo)
        {
            foreach (var from in connectingFrom.Neurons)
            {
                from.Dendrites = new List<Dendrite>();
                from.Dendrites.Add(new Dendrite());
            }

            foreach (var to in connectingTo.Neurons)
            {
                to.Dendrites = new List<Dendrite>();
                foreach (var from in connectingFrom.Neurons)
                {
                    to.Dendrites.Add(new Dendrite() { InputPulse = from.OutputPulse, SynapticWeight = connectingTo.Weight });
                }
            }
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant