Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

Conversation

Finebouche
Copy link

  • Fix FeedForwardNetwork wrong creation, where some useless node were use to create the network and some usufull ones were disregarded
  • and remove the possibility for the ouput to be an input to a new node

out_node = choice(possible_outputs)

possible_inputs = possible_outputs + config.input_keys
possible_inputs = list((set(self.nodes)- set(config.output_keys)) | set(config.input_keys) )
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes new node from taking output nodes as inputs

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removed useless nodes from the FeedForwardNetwork

if n in required and all(a in s for (a, b) in connections if b == n):
t.add(n)
# select connections (a, b) where b == n
connections_to_n = [(a, b) for (a, b) in connections if b == n and a in required]
Copy link
Author

@Finebouche Finebouche May 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change here is that a as to be in required nodes to be considered

"""
assert not set(inputs).intersection(outputs)

# Create a graph representation of the connections
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous function wasn't working as intended

Copy link

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant