rann 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +17 -0
- data/lib/rann/network.rb +10 -0
- data/lib/rann/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 671da77af2c018b9391e64bc6d6a3bdcd3267648
|
4
|
+
data.tar.gz: edeb0b1f7c6c59b5afb692872efc1c1e80492971
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6527cce72e2d732c2efee6e1acf1ca9c01187e5dbc69f27600842de1d2685766e6631183abab171a1dabb029ce45d64486a62af6b69c40f656d9dc4afe58fca8
|
7
|
+
data.tar.gz: 617ea35293d0a34f40f4e613124e73d6771bad29f47cb5860786a0e03564cd798619b51b84f0397624f5f3100a7b15a3e0ba2db0d1bef143f9e7c5e07e37bb0e
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
- Fix alias error.
|
2
|
+
|
3
|
+
*Michael Campbell*
|
4
|
+
|
5
|
+
- Simple weight initialisation method.
|
6
|
+
|
7
|
+
*Michael Campbell*
|
8
|
+
|
9
|
+
- Fix ProductNeuron backprop bug, and index bug in parallel code.
|
10
|
+
|
11
|
+
*Michael Campbell*
|
12
|
+
|
13
|
+
- Total backprop refactor. Removed recursion in network traversal in favour of
|
14
|
+
custom stack iteration and the whole thing is tons more memory efficient.
|
15
|
+
|
16
|
+
*Michael Campbell*
|
17
|
+
|
1
18
|
- Basic classes required for most neural network designs and backprop.
|
2
19
|
|
3
20
|
*Michael Campbell*
|
data/lib/rann/network.rb
CHANGED
@@ -165,6 +165,16 @@ module RANN
|
|
165
165
|
end
|
166
166
|
end
|
167
167
|
|
168
|
+
def init_normalised!
|
169
|
+
connections.each do |c|
|
170
|
+
out_cons = c.output_neuron.connection_count.to_d
|
171
|
+
from = -1.to_d.div out_cons.sqrt(10), 10
|
172
|
+
to = 1.to_d.div out_cons.sqrt(10), 10
|
173
|
+
c.weight = (to - from).mult(rand.to_d, 10) + from
|
174
|
+
end
|
175
|
+
end
|
176
|
+
alias init_normalized! init_normalised!
|
177
|
+
|
168
178
|
def recalculate_neuron_connection_counts!
|
169
179
|
neurons.each do |neuron|
|
170
180
|
neuron.connection_count = connections.count{ |c| c.output_neuron == neuron }
|
data/lib/rann/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rann
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|