stdpneuron 0.1.8__tar.gz → 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: stdpneuron
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: idk
5
5
  Project-URL: Documentation, https://github.com/Guille-ux/stdpneuron#readme
6
6
  Project-URL: Issues, https://github.com/Guille-ux/stdpneuron/issues
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2026-present Guille-ux <guilleleiratemes@gmail.com>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.1.8"
4
+ __version__ = "0.1.9"
@@ -15,6 +15,7 @@ class NeuronMass:
15
15
  self.bias = [5] * self.total_cons
16
16
  self.pr = 0
17
17
  self.outputs = [0] * self.n_neurons
18
+ self.last_outputs = [0] * self.n_neurons
18
19
  self.v_decay = v_decay
19
20
  self.t_decay = t_decay
20
21
  def save_model(self, name):
@@ -51,6 +52,8 @@ class NeuronMass:
51
52
  self.connections_in[i*self.n_cons+j] = random.randint(0, self.n_neurons-1)
52
53
  # esta función genera conexiones neuronales aleatorias, bruh
53
54
  def tick(self):
55
+ self.last_outputs = self.outputs[:]
56
+ self.outputs = [0] * self.n_neurons
54
57
  # PROCESAR ACTIVACIÓN DE NEURONAS
55
58
  for i in range(self.n_neurons):
56
59
  cons_ids = []
@@ -58,7 +61,7 @@ class NeuronMass:
58
61
  for j in range(self.total_cons):
59
62
  if self.connections_in[j] == i: # es decir, esta conexión entra en la neurona q estamos mirando?
60
63
  cons_ids.append(j)
61
- delta_voltage += self.bias[j]*self.outputs[self.connections_out[j]] * self.voltage[self.connections_out[j]]
64
+ delta_voltage += self.bias[j]*self.last_outputs[self.connections_out[j]] * self.voltage[self.connections_out[j]]
62
65
  self.temperature[j] += delta_voltage
63
66
  self.voltage[i] += delta_voltage
64
67
  if self.voltage[i] > self.threeholds[i]:
File without changes
File without changes
File without changes
File without changes