stdpneuron 0.0.1__tar.gz → 0.0.2__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.0.1
3
+ Version: 0.0.2
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.0.1"
4
+ __version__ = "0.0.2"
@@ -2,4 +2,4 @@
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
4
 
5
- import brain
5
+ from .brain import NeuronMass
@@ -55,10 +55,11 @@ class NeuronMass:
55
55
  for i in range(self.n_neurons):
56
56
  cons_ids = []
57
57
  delta_voltage = 0
58
- for j in range(self.n_cons):
58
+ for j in range(self.total_cons):
59
59
  if self.connections_in[j] == i: # es decir, esta conexión entra en la neurona q estamos mirando?
60
60
  cons_ids.append(j)
61
61
  delta_voltage += self.bias[j]*self.outputs[self.connections_out[j]] * self.voltage[self.connections_out[j]]
62
+ self.temperature[j] += 1
62
63
  self.voltage[i] += delta_voltage
63
64
  if self.voltage[i] > self.threeholds[i]:
64
65
  self.outputs[i] = 1
@@ -66,4 +67,14 @@ class NeuronMass:
66
67
  self.outputs[i] = 0
67
68
  self.voltage[i] *= self.v_decay
68
69
  # CALCULAR CAMBIOS EN LAS CONEXIONES Y APLICARLOS
69
- pass
70
+ for i in range(self.total_cons):
71
+ neuron_in = self.connections_in[i]
72
+ neuron_out = self.connections_out[i]
73
+ if self.outputs[neuron_in] == 1:
74
+ self.bias[i] += self.plasticity[i] * (self.temperature[i])
75
+ else:
76
+ self.bias[i] -= self.plasticity[i] * self.temperature[i]
77
+
78
+ self.bias[i] += self.pr * self.plasticity[i] * self.temperature[i]
79
+
80
+ self.temperature[i] *= self.t_decay
File without changes
File without changes
File without changes
File without changes