ruby-cntk 0.1.0.pre2 → 0.1.1
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/ext/cntk/cntk_wrap.cxx +338 -774
- data/lib/cntk/ndarrayview.rb +1 -1
- data/lib/cntk/ops.rb +4 -4
- data/lib/cntk/trainer.rb +2 -1
- metadata +7 -7
data/lib/cntk/ndarrayview.rb
CHANGED
@@ -14,7 +14,7 @@ module CNTK
|
|
14
14
|
raise ArgumentError, "Numo::NArray or NDArrayView expected"
|
15
15
|
end
|
16
16
|
return self.new(dtype, a.shape, a.flatten.to_a,
|
17
|
-
CNTK::DeviceDescriptor.
|
17
|
+
CNTK::DeviceDescriptor.use_default_device(), false)
|
18
18
|
else
|
19
19
|
raise ArgumentError, "not responds to :shape"
|
20
20
|
end
|
data/lib/cntk/ops.rb
CHANGED
@@ -155,11 +155,11 @@ module Ops
|
|
155
155
|
|
156
156
|
def convolution(kernel: nil, input: nil, strides: [1], sharing: [true],
|
157
157
|
padding: [false], lower_pad: [0], upper_pad: [0],
|
158
|
-
|
158
|
+
max_temp_mem_size_in_samples: 0, name: "")
|
159
159
|
kernel = Ops.convert_to_variable( kernel )
|
160
160
|
input = Ops.convert_to_variable( input )
|
161
161
|
CNTK.__convolution__(kernel, input, strides, sharing, padding, lower_pad, upper_pad,
|
162
|
-
|
162
|
+
max_temp_mem_size_in_samples, name)
|
163
163
|
end
|
164
164
|
|
165
165
|
|
@@ -176,7 +176,7 @@ module Ops
|
|
176
176
|
end
|
177
177
|
|
178
178
|
def pooling(x, type, shape, strides: [1], padding: [false],
|
179
|
-
lower_pad: [0], upper_pad: [0], name: "")
|
179
|
+
lower_pad: [0], upper_pad: [0], ceil_out_dim: false, name: "")
|
180
180
|
x = Ops.convert_to_variable( x )
|
181
181
|
case type
|
182
182
|
when :max
|
@@ -186,7 +186,7 @@ module Ops
|
|
186
186
|
else
|
187
187
|
raise ArgumentError, "unknown pooling type"
|
188
188
|
end
|
189
|
-
CNTK.__pooling__(x, type, shape, strides, padding, lower_pad, upper_pad, name)
|
189
|
+
CNTK.__pooling__(x, type, shape, strides, padding, lower_pad, upper_pad, ceil_out_dim, name)
|
190
190
|
end
|
191
191
|
|
192
192
|
def unpooling(operand, input, type, shape, strides: [1], padding: [false],
|
data/lib/cntk/trainer.rb
CHANGED
@@ -18,7 +18,8 @@ class Trainer
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
# @param args
|
21
|
+
# @param args [Hash<Variable, MinibatchData>]
|
22
|
+
# @option opt [DeviceDescriptor] :device
|
22
23
|
# @return [Float]
|
23
24
|
def test_minibatch(args, device: DeviceDescriptor.use_default_device)
|
24
25
|
__test_minibatchdata__(args, device)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-cntk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Tamura
|
@@ -24,8 +24,8 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.9.5
|
27
|
-
description: Ruby
|
28
|
-
|
27
|
+
description: Ruby binding for Microsoft Cognitive Toolkit (CNTK), an open source deep-learning
|
28
|
+
toolkit
|
29
29
|
email: ''
|
30
30
|
executables: []
|
31
31
|
extensions:
|
@@ -68,14 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
68
68
|
version: 2.3.0
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- - "
|
71
|
+
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
73
|
+
version: '0'
|
74
74
|
requirements:
|
75
|
-
- CNTK
|
75
|
+
- CNTK == 2.0b11
|
76
76
|
rubyforge_project:
|
77
77
|
rubygems_version: 2.5.2
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
|
-
summary: Ruby
|
80
|
+
summary: Ruby binding for Microsoft CNTK, an open source deep-learning toolkit
|
81
81
|
test_files: []
|