rann 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rann/backprop.rb +1 -7
- data/lib/rann/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6dff2d631ccf502189d84d05fa9835cb8fa68c9d
|
4
|
+
data.tar.gz: cb1df08ddd1421e2c4a4f736fb8d946bafabbd8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaa784026bb0e1a7efd2234b1bb906aee50dfb392677825264f8b77fd5f9a23a04679a6c23306d7a70bc8d0e15a553d804e76afdd4a448198d9f67b05ad50392
|
7
|
+
data.tar.gz: ee77695cfb639fa917a5684628ba9681c4484a60c863b814805697f1fe81f9da834f866069136e38b60afcc1322575627714716bd228764b7a5ddd978860c9f5
|
data/lib/rann/backprop.rb
CHANGED
@@ -118,7 +118,7 @@ module RANN
|
|
118
118
|
|
119
119
|
while current = neuron_stack.shift
|
120
120
|
neuron, timestep = current
|
121
|
-
next if node_deltas[timestep].key? neuron
|
121
|
+
next if node_deltas[timestep].key? neuron.id
|
122
122
|
|
123
123
|
from_here = bptt_connecting_to neuron, network, timestep
|
124
124
|
neuron_stack.push *from_here
|
@@ -188,12 +188,6 @@ module RANN
|
|
188
188
|
network.neurons.select(&:context?).each{ |n| n.value = 0.to_d }
|
189
189
|
end
|
190
190
|
|
191
|
-
def adagrad avg_grad, cid
|
192
|
-
@historical_gradient[cid] = DECAY.mult(@historical_gradient[cid], 10) + (1 - DECAY).mult(avg_grad.power(2, 10), 10)
|
193
|
-
|
194
|
-
avg_grad.mult(- @lr.div((FUDGE_FACTOR + @historical_gradient[cid]).sqrt(10), 10), 10)
|
195
|
-
end
|
196
|
-
|
197
191
|
def self.mse targets, outputs
|
198
192
|
total_squared_error = 0.to_d
|
199
193
|
|
data/lib/rann/version.rb
CHANGED