stdpneuron 0.1.9__tar.gz → 0.1.11__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.9
3
+ Version: 0.1.11
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.9"
4
+ __version__ = "0.1.11"
@@ -61,14 +61,15 @@ class NeuronMass:
61
61
  for j in range(self.total_cons):
62
62
  if self.connections_in[j] == i: # es decir, esta conexión entra en la neurona q estamos mirando?
63
63
  cons_ids.append(j)
64
- delta_voltage += self.bias[j]*self.last_outputs[self.connections_out[j]] * self.voltage[self.connections_out[j]]
65
- self.temperature[j] += delta_voltage
64
+ delta_voltage += self.bias[j]*self.last_outputs[self.connections_out[j]] * min(1.0, self.voltage[self.connections_out[j]])
65
+ self.temperature[j] += self.bias[j]*self.last_outputs[self.connections_out[j]] * min(1.0, self.voltage[self.connections_out[j]])
66
66
  self.voltage[i] += delta_voltage
67
67
  if self.voltage[i] > self.threeholds[i]:
68
68
  self.outputs[i] = 1
69
+ self.voltage[i] = 0
69
70
  else:
70
71
  self.outputs[i] = 0
71
- self.voltage[i] *= self.v_decay
72
+ #self.voltage[i] *= self.v_decay
72
73
  # CALCULAR CAMBIOS EN LAS CONEXIONES Y APLICARLOS
73
74
  for i in range(self.total_cons):
74
75
  neuron_in = self.connections_in[i]
@@ -77,7 +78,7 @@ class NeuronMass:
77
78
  self.bias[i] += self.plasticity[i] * (self.temperature[i])
78
79
 
79
80
  else:
80
- self.bias[i] *= self.plasticity[i] * 0.8 * self.temperature[i]
81
+ self.bias[i] *= self.plasticity[i] * 0.8
81
82
 
82
83
 
83
84
  self.bias[i] += self.pr * self.plasticity[i] * self.temperature[i] * 1
File without changes
File without changes
File without changes