tensor_stream 0.9.6 → 0.9.7
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f312e783bb684267b34aa4a12cfcea525095f0fa7237c4666c19e04e21b669c
|
4
|
+
data.tar.gz: 8910619b66cff18f07dd6c4c0ff0a68273f4534e702ef2ace26dfb99de162850
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6586f8f501505322fe94da573d38923fac7546c72b9a96df4bac22e9c2ec3bb2b60fa1682fb8ed330a58d068a6917e829a9f69ab6a8be4f8a2b6d3e46d7891f6
|
7
|
+
data.tar.gz: 8fbf3fb157c6c30240a5bc9d578341c38d562f7e2b6510640e4d1e568770954275a6f21c0c53e310cd665c8773ed7432c0a16338bf806cd4e6cdcbdea48a61a1
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.9.6] - 2018-11-18
|
8
|
+
- [NEW OP] Convolutional networks - conv2d, conv2d_backprop_filter, conv2d_backprop_input
|
9
|
+
- [IMAGE] Exposed image resampling options
|
10
|
+
- [BUG FIX] fix argmin, argmax handling of NaN values
|
11
|
+
|
7
12
|
## [0.9.5] - 2018-11-05
|
8
13
|
- [NEW OP] assert_equal, relu6
|
9
14
|
- [TRAINING] learning_rate_decay, dropout
|
@@ -264,6 +264,8 @@ module TensorStream
|
|
264
264
|
|
265
265
|
(0...height).step(height_stride).each do |y|
|
266
266
|
(0...width).step(width_stride).each do |x|
|
267
|
+
img_grad = grad[b][y/height_stride][x/width_stride]
|
268
|
+
|
267
269
|
(0...f_height).each do |f_y|
|
268
270
|
(0...f_width).each do |f_x|
|
269
271
|
next if x + f_x >= width
|
@@ -271,7 +273,7 @@ module TensorStream
|
|
271
273
|
|
272
274
|
channels.times.each do |c|
|
273
275
|
image_gradient[y + f_y][x + f_x][c] += Array.new(output_channels) do |o_c|
|
274
|
-
filter[f_y][f_x][c][o_c] *
|
276
|
+
filter[f_y][f_x][c][o_c] * img_grad[o_c]
|
275
277
|
end.reduce(:+)
|
276
278
|
end
|
277
279
|
end
|
@@ -298,15 +300,15 @@ module TensorStream
|
|
298
300
|
|
299
301
|
(0...height).step(height_stride).each do |y|
|
300
302
|
(0...width).step(width_stride).each do |x|
|
303
|
+
image_grad = grad[index][y/height_stride][x/width_stride]
|
301
304
|
filter_result = (0...f_height).map do |f_y|
|
302
305
|
(0...f_width).map do |f_x|
|
303
|
-
|
304
306
|
next Array.new(input_channels * output_channels) { 0.0 } if x + f_x >= width
|
305
307
|
next Array.new(input_channels * output_channels) { 0.0 } if y + f_y >= height
|
306
308
|
|
307
309
|
image[y + f_y][x + f_x].each_with_index.map do |image_channel, c_channel|
|
308
310
|
output_channels.times.map do |o_c|
|
309
|
-
image_channel *
|
311
|
+
image_channel * image_grad[o_c]
|
310
312
|
end
|
311
313
|
end
|
312
314
|
end
|
@@ -178,6 +178,10 @@ module TensorStream
|
|
178
178
|
new_shape = tensor.inputs[0].shape.shape.dup
|
179
179
|
new_shape[3] = tensor.inputs[1].shape.shape[3]
|
180
180
|
new_shape
|
181
|
+
when :conv2d_backprop_input
|
182
|
+
return nil unless tensor.inputs[0].value
|
183
|
+
|
184
|
+
tensor.inputs[0].value
|
181
185
|
else
|
182
186
|
return nil if tensor.inputs[0].nil?
|
183
187
|
return tensor.inputs[0].shape.shape if tensor.inputs.size == 1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tensor_stream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joseph Emmanuel Dayo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|