Skip to content

possible error in layer connection and ALL_TO_ELSE #340

Description

@iholgado

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,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions