ruby-dnn 0.15.3 → 0.16.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/Rakefile +1 -9
- data/examples/api-examples/early_stopping_example.rb +1 -1
- data/examples/api-examples/initializer_example.rb +1 -1
- data/examples/api-examples/regularizer_example.rb +1 -1
- data/examples/api-examples/save_example.rb +1 -1
- data/examples/dcgan/dcgan.rb +3 -3
- data/examples/iris_example.rb +41 -17
- data/examples/mnist_define_by_run.rb +1 -1
- data/examples/pix2pix/dcgan.rb +157 -0
- data/examples/pix2pix/imgen.rb +27 -0
- data/examples/pix2pix/train.rb +52 -0
- data/lib/dnn.rb +2 -0
- data/lib/dnn/core/layers/activations.rb +37 -19
- data/lib/dnn/core/layers/basic_layers.rb +110 -25
- data/lib/dnn/core/layers/cnn_layers.rb +19 -21
- data/lib/dnn/core/layers/embedding.rb +3 -3
- data/lib/dnn/core/layers/math_layers.rb +169 -0
- data/lib/dnn/core/layers/merge_layers.rb +29 -24
- data/lib/dnn/core/layers/normalizations.rb +4 -2
- data/lib/dnn/core/layers/rnn_layers.rb +44 -36
- data/lib/dnn/core/link.rb +7 -2
- data/lib/dnn/core/losses.rb +54 -30
- data/lib/dnn/core/models.rb +47 -47
- data/lib/dnn/core/monkey_patch.rb +75 -0
- data/lib/dnn/core/optimizers.rb +10 -6
- data/lib/dnn/core/param.rb +17 -0
- data/lib/dnn/core/regularizers.rb +35 -33
- data/lib/dnn/core/tensor.rb +40 -0
- data/lib/dnn/core/utils.rb +1 -1
- data/lib/dnn/datasets/cifar10.rb +10 -9
- data/lib/dnn/datasets/cifar100.rb +10 -9
- data/lib/dnn/datasets/downloader.rb +1 -5
- data/lib/dnn/datasets/fashion-mnist.rb +4 -12
- data/lib/dnn/datasets/iris.rb +9 -9
- data/lib/dnn/datasets/mnist.rb +4 -12
- data/lib/dnn/datasets/stl-10.rb +6 -8
- data/lib/dnn/version.rb +1 -1
- data/ruby-dnn.gemspec +1 -1
- metadata +7 -5
- data/ext/cifar_loader/cifar_loader.c +0 -77
- data/ext/cifar_loader/extconf.rb +0 -3
data/lib/dnn/core/utils.rb
CHANGED
data/lib/dnn/datasets/cifar10.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require "zlib"
|
2
2
|
require "archive/tar/minitar"
|
3
|
-
require_relative "../../../ext/cifar_loader/cifar_loader"
|
4
3
|
require_relative "downloader"
|
5
4
|
|
6
5
|
URL_CIFAR10 = "https://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz"
|
@@ -28,23 +27,25 @@ module DNN
|
|
28
27
|
bin = ""
|
29
28
|
(1..5).each do |i|
|
30
29
|
fname = DOWNLOADS_PATH + "/downloads/#{DIR_CIFAR10}/data_batch_#{i}.bin"
|
31
|
-
raise DNN_CIFAR10_LoadError
|
30
|
+
raise DNN_CIFAR10_LoadError, %`file "#{fname}" is not found.` unless File.exist?(fname)
|
32
31
|
bin << File.binread(fname)
|
33
32
|
end
|
34
|
-
|
35
|
-
x_train =
|
36
|
-
|
33
|
+
datas = Numo::UInt8.from_binary(bin).reshape(50000, 3073)
|
34
|
+
x_train = datas[true, 1...3073]
|
35
|
+
x_train = x_train.reshape(50000, 3, 32, 32).transpose(0, 2, 3, 1).clone
|
36
|
+
y_train = datas[true, 0]
|
37
37
|
[x_train, y_train]
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.load_test
|
41
41
|
downloads
|
42
42
|
fname = DOWNLOADS_PATH + "/downloads/#{DIR_CIFAR10}/test_batch.bin"
|
43
|
-
raise DNN_CIFAR10_LoadError
|
43
|
+
raise DNN_CIFAR10_LoadError, %`file "#{fname}" is not found.` unless File.exist?(fname)
|
44
44
|
bin = File.binread(fname)
|
45
|
-
|
46
|
-
x_test =
|
47
|
-
|
45
|
+
datas = Numo::UInt8.from_binary(bin).reshape(10000, 3073)
|
46
|
+
x_test = datas[true, 1...3073]
|
47
|
+
x_test = x_test.reshape(10000, 3, 32, 32).transpose(0, 2, 3, 1).clone
|
48
|
+
y_test = datas[true, 0]
|
48
49
|
[x_test, y_test]
|
49
50
|
end
|
50
51
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require "zlib"
|
2
2
|
require "archive/tar/minitar"
|
3
|
-
require_relative "../../../ext/cifar_loader/cifar_loader"
|
4
3
|
require_relative "downloader"
|
5
4
|
|
6
5
|
URL_CIFAR100 = "https://www.cs.toronto.edu/~kriz/cifar-100-binary.tar.gz"
|
@@ -27,22 +26,24 @@ module DNN
|
|
27
26
|
downloads
|
28
27
|
bin = ""
|
29
28
|
fname = DOWNLOADS_PATH + "/downloads/#{DIR_CIFAR100}/train.bin"
|
30
|
-
raise DNN_CIFAR100_LoadError
|
29
|
+
raise DNN_CIFAR100_LoadError, %`file "#{fname}" is not found.` unless File.exist?(fname)
|
31
30
|
bin << File.binread(fname)
|
32
|
-
|
33
|
-
x_train =
|
34
|
-
|
31
|
+
datas = Numo::UInt8.from_binary(bin).reshape(50000, 3074)
|
32
|
+
x_train = datas[true, 2...3074]
|
33
|
+
x_train = x_train.reshape(50000, 3, 32, 32).transpose(0, 2, 3, 1).clone
|
34
|
+
y_train = datas[true, 0...2]
|
35
35
|
[x_train, y_train]
|
36
36
|
end
|
37
37
|
|
38
38
|
def self.load_test
|
39
39
|
downloads
|
40
40
|
fname = DOWNLOADS_PATH + "/downloads/#{DIR_CIFAR100}/test.bin"
|
41
|
-
raise DNN_CIFAR100_LoadError
|
41
|
+
raise DNN_CIFAR100_LoadError, %`file "#{fname}" is not found.` unless File.exist?(fname)
|
42
42
|
bin = File.binread(fname)
|
43
|
-
|
44
|
-
x_test =
|
45
|
-
|
43
|
+
datas = Numo::UInt8.from_binary(bin).reshape(10000, 3074)
|
44
|
+
x_test = datas[true, 2...3074]
|
45
|
+
x_test = x_test.reshape(10000, 3, 32, 32).transpose(0, 2, 3, 1).clone
|
46
|
+
y_test = datas[true, 0...2]
|
46
47
|
[x_test, y_test]
|
47
48
|
end
|
48
49
|
end
|
@@ -1,11 +1,7 @@
|
|
1
1
|
require "net/http"
|
2
2
|
|
3
3
|
module DNN
|
4
|
-
|
5
|
-
DOWNLOADS_PATH = ENV["RUBY_DNN_DOWNLOADS_PATH"]
|
6
|
-
else
|
7
|
-
DOWNLOADS_PATH = __dir__
|
8
|
-
end
|
4
|
+
DOWNLOADS_PATH = ENV["RUBY_DNN_DOWNLOADS_PATH"] || __dir__
|
9
5
|
|
10
6
|
class DNN_DownloadError < DNN_Error; end
|
11
7
|
|
@@ -32,12 +32,8 @@ module DNN
|
|
32
32
|
downloads
|
33
33
|
train_images_file_path = get_file_path(TRAIN_IMAGES_FILE_NAME)
|
34
34
|
train_labels_file_path = get_file_path(TRAIN_LABELS_FILE_NAME)
|
35
|
-
unless File.exist?(train_images_file_path)
|
36
|
-
|
37
|
-
end
|
38
|
-
unless File.exist?(train_labels_file_path)
|
39
|
-
raise DNN_MNIST_LoadError.new(%`file "#{train_labels_file_path}" is not found.`)
|
40
|
-
end
|
35
|
+
raise DNN_MNIST_LoadError, %`file "#{train_images_file_path}" is not found.` unless File.exist?(train_images_file_path)
|
36
|
+
raise DNN_MNIST_LoadError, %`file "#{train_labels_file_path}" is not found.` unless File.exist?(train_labels_file_path)
|
41
37
|
images = load_images(train_images_file_path)
|
42
38
|
labels = load_labels(train_labels_file_path)
|
43
39
|
[images, labels]
|
@@ -47,12 +43,8 @@ module DNN
|
|
47
43
|
downloads
|
48
44
|
test_images_file_path = get_file_path(TEST_IMAGES_FILE_NAME)
|
49
45
|
test_labels_file_path = get_file_path(TEST_LABELS_FILE_NAME)
|
50
|
-
unless File.exist?(test_images_file_path)
|
51
|
-
|
52
|
-
end
|
53
|
-
unless File.exist?(test_labels_file_path)
|
54
|
-
raise DNN_MNIST_LoadError.new(%`file "#{test_labels_file_path}" is not found.`)
|
55
|
-
end
|
46
|
+
raise DNN_MNIST_LoadError, %`file "#{test_images_file_path}" is not found.` unless File.exist?(test_images_file_path)
|
47
|
+
raise DNN_MNIST_LoadError, %`file "#{test_labels_file_path}" is not found.` unless File.exist?(test_labels_file_path)
|
56
48
|
images = load_images(test_images_file_path)
|
57
49
|
labels = load_labels(test_labels_file_path)
|
58
50
|
[images, labels]
|
data/lib/dnn/datasets/iris.rb
CHANGED
@@ -21,7 +21,7 @@ module DNN
|
|
21
21
|
|
22
22
|
def self.load(shuffle = false, shuffle_seed = rand(1 << 31))
|
23
23
|
downloads
|
24
|
-
csv_array = CSV.read(url_to_file_name(URL_CSV)).
|
24
|
+
csv_array = CSV.read(url_to_file_name(URL_CSV)).reject(&:empty?)
|
25
25
|
x = Numo::SFloat.zeros(csv_array.length, 4)
|
26
26
|
y = Numo::SFloat.zeros(csv_array.length)
|
27
27
|
csv_array.each.with_index do |(sepal_length, sepal_width, petal_length, petal_width, classes), i|
|
@@ -30,14 +30,14 @@ module DNN
|
|
30
30
|
x[i, 2] = petal_length.to_f
|
31
31
|
x[i, 3] = petal_width.to_f
|
32
32
|
y[i] = case classes
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
33
|
+
when "Iris-setosa"
|
34
|
+
SETOSA
|
35
|
+
when "Iris-versicolor"
|
36
|
+
VERSICOLOR
|
37
|
+
when "Iris-virginica"
|
38
|
+
VIRGINICA
|
39
|
+
else
|
40
|
+
raise DNN_Iris_LoadError, "Unknown class name '#{classes}' for iris"
|
41
41
|
end
|
42
42
|
end
|
43
43
|
if shuffle
|
data/lib/dnn/datasets/mnist.rb
CHANGED
@@ -31,12 +31,8 @@ module DNN
|
|
31
31
|
downloads
|
32
32
|
train_images_file_path = get_file_path(TRAIN_IMAGES_FILE_NAME)
|
33
33
|
train_labels_file_path = get_file_path(TRAIN_LABELS_FILE_NAME)
|
34
|
-
unless File.exist?(train_images_file_path)
|
35
|
-
|
36
|
-
end
|
37
|
-
unless File.exist?(train_labels_file_path)
|
38
|
-
raise DNN_MNIST_LoadError.new(%`file "#{train_labels_file_path}" is not found.`)
|
39
|
-
end
|
34
|
+
raise DNN_MNIST_LoadError, %`file "#{train_images_file_path}" is not found.` unless File.exist?(train_images_file_path)
|
35
|
+
raise DNN_MNIST_LoadError, %`file "#{train_labels_file_path}" is not found.` unless File.exist?(train_labels_file_path)
|
40
36
|
images = load_images(train_images_file_path)
|
41
37
|
labels = load_labels(train_labels_file_path)
|
42
38
|
[images, labels]
|
@@ -46,12 +42,8 @@ module DNN
|
|
46
42
|
downloads
|
47
43
|
test_images_file_path = get_file_path(TEST_IMAGES_FILE_NAME)
|
48
44
|
test_labels_file_path = get_file_path(TEST_LABELS_FILE_NAME)
|
49
|
-
unless File.exist?(test_images_file_path)
|
50
|
-
|
51
|
-
end
|
52
|
-
unless File.exist?(test_labels_file_path)
|
53
|
-
raise DNN_MNIST_LoadError.new(%`file "#{test_labels_file_path}" is not found.`)
|
54
|
-
end
|
45
|
+
raise DNN_MNIST_LoadError, %`file "#{test_images_file_path}" is not found.` unless File.exist?(test_images_file_path)
|
46
|
+
raise DNN_MNIST_LoadError, %`file "#{test_labels_file_path}" is not found.` unless File.exist?(test_labels_file_path)
|
55
47
|
images = load_images(test_images_file_path)
|
56
48
|
labels = load_labels(test_labels_file_path)
|
57
49
|
[images, labels]
|
data/lib/dnn/datasets/stl-10.rb
CHANGED
@@ -25,9 +25,9 @@ module DNN
|
|
25
25
|
def self.load_train
|
26
26
|
downloads
|
27
27
|
x_fname = DOWNLOADS_PATH + "/downloads/#{DIR_STL10}/train_X.bin"
|
28
|
-
raise DNN_STL10_LoadError
|
28
|
+
raise DNN_STL10_LoadError, %`file "#{x_fname}" is not found.` unless File.exist?(x_fname)
|
29
29
|
y_fname = DOWNLOADS_PATH + "/downloads/#{DIR_STL10}/train_y.bin"
|
30
|
-
raise DNN_STL10_LoadError
|
30
|
+
raise DNN_STL10_LoadError, %`file "#{y_fname}" is not found.` unless File.exist?(y_fname)
|
31
31
|
x_bin = File.binread(x_fname)
|
32
32
|
y_bin = File.binread(y_fname)
|
33
33
|
x_train = Numo::UInt8.from_binary(x_bin).reshape(5000, 3, 96, 96).transpose(0, 3, 2, 1).clone
|
@@ -38,9 +38,9 @@ module DNN
|
|
38
38
|
def self.load_test
|
39
39
|
downloads
|
40
40
|
x_fname = DOWNLOADS_PATH + "/downloads/#{DIR_STL10}/test_X.bin"
|
41
|
-
raise DNN_STL10_LoadError
|
41
|
+
raise DNN_STL10_LoadError, %`file "#{x_fname}" is not found.` unless File.exist?(x_fname)
|
42
42
|
y_fname = DOWNLOADS_PATH + "/downloads/#{DIR_STL10}/test_y.bin"
|
43
|
-
raise DNN_STL10_LoadError
|
43
|
+
raise DNN_STL10_LoadError, %`file "#{y_fname}" is not found.` unless File.exist?(y_fname)
|
44
44
|
x_bin = File.binread(x_fname)
|
45
45
|
y_bin = File.binread(y_fname)
|
46
46
|
x_test = Numo::UInt8.from_binary(x_bin).reshape(8000, 3, 96, 96).transpose(0, 3, 2, 1).clone
|
@@ -49,12 +49,10 @@ module DNN
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.load_unlabeled(range = 0...100000)
|
52
|
-
|
53
|
-
raise DNN_Error, "Range must between 0 and 100000. (But the end is excluded)"
|
54
|
-
end
|
52
|
+
raise DNN_Error, "Range must between 0 and 100000. (But the end is excluded)" unless range.begin >= 0 && range.end <= 100000
|
55
53
|
downloads
|
56
54
|
x_fname = DOWNLOADS_PATH + "/downloads/#{DIR_STL10}/unlabeled_X.bin"
|
57
|
-
raise DNN_STL10_LoadError
|
55
|
+
raise DNN_STL10_LoadError, %`file "#{x_fname}" is not found.` unless File.exist?(x_fname)
|
58
56
|
num_datas = range.end - range.begin
|
59
57
|
length = num_datas * 3 * 96 * 96
|
60
58
|
ofs = range.begin * 3 * 96 * 96
|
data/lib/dnn/version.rb
CHANGED
data/ruby-dnn.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.description = %q{ruby-dnn is a ruby deep learning library.}
|
14
14
|
spec.homepage = "https://github.com/unagiootoro/ruby-dnn.git"
|
15
15
|
spec.license = "MIT"
|
16
|
-
spec.extensions = ["ext/
|
16
|
+
spec.extensions = ["ext/rb_stb_image/extconf.rb"]
|
17
17
|
|
18
18
|
spec.add_dependency "numo-narray"
|
19
19
|
spec.add_dependency "archive-tar-minitar"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-dnn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- unagiootoro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-narray
|
@@ -85,7 +85,6 @@ email:
|
|
85
85
|
- ootoro838861@outlook.jp
|
86
86
|
executables: []
|
87
87
|
extensions:
|
88
|
-
- ext/cifar_loader/extconf.rb
|
89
88
|
- ext/rb_stb_image/extconf.rb
|
90
89
|
extra_rdoc_files: []
|
91
90
|
files:
|
@@ -112,9 +111,10 @@ files:
|
|
112
111
|
- examples/mnist_define_by_run.rb
|
113
112
|
- examples/mnist_example.rb
|
114
113
|
- examples/mnist_lstm_example.rb
|
114
|
+
- examples/pix2pix/dcgan.rb
|
115
|
+
- examples/pix2pix/imgen.rb
|
116
|
+
- examples/pix2pix/train.rb
|
115
117
|
- examples/xor_example.rb
|
116
|
-
- ext/cifar_loader/cifar_loader.c
|
117
|
-
- ext/cifar_loader/extconf.rb
|
118
118
|
- ext/rb_stb_image/extconf.rb
|
119
119
|
- ext/rb_stb_image/rb_stb_image.c
|
120
120
|
- lib/dnn.rb
|
@@ -127,12 +127,14 @@ files:
|
|
127
127
|
- lib/dnn/core/layers/basic_layers.rb
|
128
128
|
- lib/dnn/core/layers/cnn_layers.rb
|
129
129
|
- lib/dnn/core/layers/embedding.rb
|
130
|
+
- lib/dnn/core/layers/math_layers.rb
|
130
131
|
- lib/dnn/core/layers/merge_layers.rb
|
131
132
|
- lib/dnn/core/layers/normalizations.rb
|
132
133
|
- lib/dnn/core/layers/rnn_layers.rb
|
133
134
|
- lib/dnn/core/link.rb
|
134
135
|
- lib/dnn/core/losses.rb
|
135
136
|
- lib/dnn/core/models.rb
|
137
|
+
- lib/dnn/core/monkey_patch.rb
|
136
138
|
- lib/dnn/core/optimizers.rb
|
137
139
|
- lib/dnn/core/param.rb
|
138
140
|
- lib/dnn/core/regularizers.rb
|
@@ -1,77 +0,0 @@
|
|
1
|
-
#include <ruby.h>
|
2
|
-
#include <stdint.h>
|
3
|
-
#include <stdlib.h>
|
4
|
-
|
5
|
-
#define CIFAR_WIDTH 32
|
6
|
-
#define CIFAR_HEIGHT 32
|
7
|
-
#define CIFAR_CHANNEL 3
|
8
|
-
|
9
|
-
static VALUE cifar10_load_binary(VALUE self, VALUE rb_bin, VALUE rb_num_datas) {
|
10
|
-
uint8_t* bin = (uint8_t*)StringValuePtr(rb_bin);
|
11
|
-
int32_t num_datas = FIX2INT(rb_num_datas);
|
12
|
-
VALUE rb_x_bin;
|
13
|
-
VALUE rb_y_bin;
|
14
|
-
int32_t i;
|
15
|
-
int32_t j = 0;
|
16
|
-
int32_t k = 0;
|
17
|
-
int32_t size = CIFAR_WIDTH * CIFAR_HEIGHT * CIFAR_CHANNEL;
|
18
|
-
int32_t x_bin_size = num_datas * size;
|
19
|
-
int32_t y_bin_size = num_datas;
|
20
|
-
uint8_t* x_bin;
|
21
|
-
uint8_t* y_bin;
|
22
|
-
|
23
|
-
x_bin = (uint8_t*)malloc(x_bin_size);
|
24
|
-
y_bin = (uint8_t*)malloc(y_bin_size);
|
25
|
-
for (i = 0; i < num_datas; i++) {
|
26
|
-
y_bin[i] = bin[j];
|
27
|
-
j++;
|
28
|
-
memcpy(&x_bin[k], &bin[j], size);
|
29
|
-
j += size;
|
30
|
-
k += size;
|
31
|
-
}
|
32
|
-
rb_x_bin = rb_str_new((char*)x_bin, x_bin_size);
|
33
|
-
rb_y_bin = rb_str_new((char*)y_bin, y_bin_size);
|
34
|
-
free(x_bin);
|
35
|
-
free(y_bin);
|
36
|
-
return rb_ary_new3(2, rb_x_bin, rb_y_bin);
|
37
|
-
}
|
38
|
-
|
39
|
-
static VALUE cifar100_load_binary(VALUE self, VALUE rb_bin, VALUE rb_num_datas) {
|
40
|
-
uint8_t* bin = (uint8_t*)StringValuePtr(rb_bin);
|
41
|
-
int32_t num_datas = FIX2INT(rb_num_datas);
|
42
|
-
VALUE rb_x_bin;
|
43
|
-
VALUE rb_y_bin;
|
44
|
-
int32_t i;
|
45
|
-
int32_t j = 0;
|
46
|
-
int32_t k = 0;
|
47
|
-
int32_t size = CIFAR_WIDTH * CIFAR_HEIGHT * CIFAR_CHANNEL;
|
48
|
-
int32_t x_bin_size = num_datas * size;
|
49
|
-
int32_t y_bin_size = num_datas * 2;
|
50
|
-
uint8_t* x_bin;
|
51
|
-
uint8_t* y_bin;
|
52
|
-
|
53
|
-
x_bin = (uint8_t*)malloc(x_bin_size);
|
54
|
-
y_bin = (uint8_t*)malloc(y_bin_size);
|
55
|
-
for (i = 0; i < num_datas; i++) {
|
56
|
-
y_bin[i * 2] = bin[j];
|
57
|
-
y_bin[i * 2 + 1] = bin[j + 1];
|
58
|
-
j += 2;
|
59
|
-
memcpy(&x_bin[k], &bin[j], size);
|
60
|
-
j += size;
|
61
|
-
k += size;
|
62
|
-
}
|
63
|
-
rb_x_bin = rb_str_new((char*)x_bin, x_bin_size);
|
64
|
-
rb_y_bin = rb_str_new((char*)y_bin, y_bin_size);
|
65
|
-
free(x_bin);
|
66
|
-
free(y_bin);
|
67
|
-
return rb_ary_new3(2, rb_x_bin, rb_y_bin);
|
68
|
-
}
|
69
|
-
|
70
|
-
void Init_cifar_loader() {
|
71
|
-
VALUE rb_dnn = rb_define_module("DNN");
|
72
|
-
VALUE rb_cifar10 = rb_define_module_under(rb_dnn, "CIFAR10");
|
73
|
-
VALUE rb_cifar100 = rb_define_module_under(rb_dnn, "CIFAR100");
|
74
|
-
|
75
|
-
rb_define_singleton_method(rb_cifar10, "load_binary", cifar10_load_binary, 2);
|
76
|
-
rb_define_singleton_method(rb_cifar100, "load_binary", cifar100_load_binary, 2);
|
77
|
-
}
|
data/ext/cifar_loader/extconf.rb
DELETED