neural-network 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/neural_network.rb +3 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df40c3471ad990891b169a66c8b26d39e77f5e37
4
- data.tar.gz: cfbf1226ab8513ab5d9a3df4a58bcac4912b5e26
3
+ metadata.gz: 78c2e4e51b21762fb1828895bd884295bd69d94d
4
+ data.tar.gz: 4f1029d1112df32cc5ab462039606666cefbe7b7
5
5
  SHA512:
6
- metadata.gz: af33bbb7b386f64131c8fb3f344c85d8e145fd176576a046022e6843b3d45f1838776ee3c0c427115a4e318f025322cd9680be69d39a2d1f8152a36343d9cebc
7
- data.tar.gz: c79c571498df2c9c67880de43ceda14e934772cf88b2130c02bb7cde7f448461aadce065e4c1b0d20f13e5f84eac984551b1d942b8d783dc2adbfafc269320cd
6
+ metadata.gz: ae51974ec2a1fa3f6ddb9a30ce8bcdefcfaa34b360aeaabf0e5bbf48ef1cbcc6be48c2fec72da9d38b5595e40f62b68f3cf273916fad9039aab483ae13cfb97b
7
+ data.tar.gz: 41434b0d4d4a574be758361ba188854b7e4405c736468826b614a9d84e6f460f4fa1b9b100db90afcd99e0446ce0157356ab9e558de727165202e968ed851aec
@@ -5,7 +5,7 @@ class NeuralNetwork
5
5
  @biases = []
6
6
  @neurons = []
7
7
  @names = {}
8
- @rng = Distribution::Normal.rng
8
+ @@rng = Distribution::Normal.rng
9
9
  num_layers = sizes.length
10
10
  (0..num_layers - 1).each do |i|
11
11
  @neurons << []
@@ -16,10 +16,10 @@ class NeuralNetwork
16
16
  (0..sizes[i] - 1).each do |j|
17
17
  @neurons[-1] << 0.0
18
18
  unless i == 0
19
- @biases[-1] << Util.random_normal
19
+ @biases[-1] << @@rng.call
20
20
  @weights[-1] << []
21
21
  (0..sizes[i - 1] - 1).each do |k|
22
- @weights[-1][j] << Util.random_normal
22
+ @weights[-1][j] << @@rng.call
23
23
  end
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neural-network
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - interrobang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-06 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: