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

possible error in layer connection and ALL_TO_ELSE #340

Open
iholgado opened this issue Mar 5, 2019 · 0 comments
Open

possible error in layer connection and ALL_TO_ELSE #340

iholgado opened this issue Mar 5, 2019 · 0 comments

Comments

@iholgado
Copy link

iholgado commented Mar 5, 2019

Hi,

In Layer Connection, I don't undestant the line
if(this.type == Layer.connectionType.ALL_TO_ELSE && from == to)

because from and to are Neuron objects in two differente layers. Maybe the code must be
if(this.type == Layer.connectionType.ALL_TO_ELSE && here == there)
??

The original code was:

if (this.type == Layer.connectionType.ALL_TO_ALL ||
  this.type == Layer.connectionType.ALL_TO_ELSE) {
  for (var here in this.from.list) {
    for (var there in this.to.list) {
      var from = this.from.list[here];
      var to = this.to.list[there];
      if(this.type == Layer.connectionType.ALL_TO_ELSE && from == to)
        continue;
      var connection = from.project(to, weights);
      this.connections[connection.ID] = connection;
      this.size = this.list.push(connection);
    }
  }

Thanks,

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