nn 2.3.0 → 2.4.0
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.
- checksums.yaml +4 -4
- data/document.txt +1 -1
- data/lib/nn.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0c39df6ef1009aa84fa49e626213fe36f4ec72dc87050651ebe37060ccb2d88
|
4
|
+
data.tar.gz: 85e5ddf31d9ee27cb4b86cbd4955dc9410852e0a4c9e115df2485cf267ab05b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e8155689f6996cb4beaa2cb41ce0879c8157ea3a1c4825a0c1367f3042d8f7ff5a25c18d89be8dc1a62a0ff1ed6949031148884bfb3b2e3cb0fd5ef44dfd0a4
|
7
|
+
data.tar.gz: 81fc0f1e73b9f5a9d91b227d33b5a09426f4329299211f3fd6ffa0eeede953ab5d744b0632104781a64b1555be9eb41b41fa5b77356e03a62848b90040a1f285
|
data/document.txt
CHANGED
data/lib/nn.rb
CHANGED
@@ -2,7 +2,7 @@ require "numo/narray"
|
|
2
2
|
require "json"
|
3
3
|
|
4
4
|
class NN
|
5
|
-
VERSION = "2.
|
5
|
+
VERSION = "2.4"
|
6
6
|
|
7
7
|
include Numo
|
8
8
|
|
@@ -424,8 +424,8 @@ class NN::BatchNorm
|
|
424
424
|
end
|
425
425
|
|
426
426
|
def backward(dout)
|
427
|
-
@d_beta = dout.sum(0)
|
428
|
-
@d_gamma = (@xn * dout).sum(0)
|
427
|
+
@d_beta = dout.sum(0)
|
428
|
+
@d_gamma = (@xn * dout).sum(0)
|
429
429
|
dxn = @nn.gammas[@index] * dout
|
430
430
|
dxc = dxn / @std
|
431
431
|
dstd = -((dxn * @xc) / (@std ** 2)).sum(0)
|