)
self.add_connection(input_output_conn, source="X", target="Y")
w = torch.zeros(self.n_neurons, self.n_neurons)
for i in range(self.n_neurons):
for j in range(self.n_neurons):
if i != j:
x1, y1 = i // self.n_sqrt, i % self.n_sqrt
After Change
self.add_connection(input_output_conn, source="X", target="Y")
// add internal inhibetory connections
w = torch.ones(self.n_neurons, self.n_neurons) - torch.diag(torch.ones(self.n_neurons))
for i in range(self.n_neurons):
for j in range(self.n_neurons):
if i != j:
x1, y1 = i // self.n_sqrt, i % self.n_sqrt
x2, y2 = j // self.n_sqrt, j % self.n_sqrt
w[i, j] = np.sqrt(euclidean([x1, y1], [x2, y2]))
w = w / w.max()
w = (w * self.max_inhib) + self.start_inhib
recurrent_output_conn = Connection(
source=self.layers["Y"],
target=self.layers["Y"],