mnist-learn 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ae87b3ff341c6db37f9d503da3c135a850546852
4
- data.tar.gz: 78897ffc8dec031485af30fd87f2f7a71fc47a09
3
+ metadata.gz: 504c344a2c988dabc88a999e39ddf1606d933104
4
+ data.tar.gz: 0f14af637ecba647edd55029b2ed31f3736f8ad4
5
5
  SHA512:
6
- metadata.gz: 4aafa7cd4149b0014548247472eedc81443660d674f4861b7a3824c9d7b04fcd72b4bd7f331dc514d7e95196ec056c5d8c0b2d64095d5fc04d693e05f935ffc7
7
- data.tar.gz: feaa0c636fa9d0be6ac078bb10431966174242477d77390a78344b588eb8b727ef87fc36342ff9c4db61bed0601b86d8a5d78a14695c82f4826468caac802a7a
6
+ metadata.gz: a46c24443968425589a876d8057a8343ecd42c5afcf417e732006927c2ea3578fad1823be83a7913550b2c420a20e8f395c9e3dea781d58dcdab0dfd677f5cfe
7
+ data.tar.gz: 7761897fa21b0c0503adf09a385563bb4951087cb60d843ecc1549f1309f22c6d0ba85749e05d710b42dc48f71a54ebc3eb9f1f90b21bd81705fe76e783be670
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /spec/fixtures/data
10
10
  /tmp/
11
11
  /data
12
+ .rspec_status
data/.rspec_status CHANGED
@@ -1,4 +1,4 @@
1
1
  example_id | status | run_time |
2
2
  --------------------------- | ------ | ------------ |
3
- ./spec/mnist_spec.rb[1:1:1] | passed | 6.54 seconds |
4
- ./spec/mnist_spec.rb[1:1:2] | failed | 2.62 seconds |
3
+ ./spec/mnist_spec.rb[1:1:1] | passed | 6.49 seconds |
4
+ ./spec/mnist_spec.rb[1:1:2] | passed | 3.01 seconds |
@@ -1,3 +1,3 @@
1
1
  module Mnist
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/mnist-learn.rb CHANGED
@@ -66,7 +66,7 @@ module Mnist
66
66
  end
67
67
 
68
68
  def labels
69
- @all_labels ||= load_labels
69
+ @all_labels ||= (@one_hot ? load_labels.map { |label_data| one_hot_transform(label_data) } : load_labels)
70
70
  end
71
71
 
72
72
  def next_batch(batch_size)
@@ -78,12 +78,12 @@ module Mnist
78
78
  labels = []
79
79
  batch_size.times.each do
80
80
  next if @index >= @total_count
81
- image_data = @images[@index]
82
- label_data = @labels[@index]
83
- image_data.map! { |b| b.to_f / 255.0 }
84
- @index += 1
85
- images << image_data
86
- labels << (@one_hot ? one_hot_transform(label_data) : label_data.to_f)
81
+ image_data = @images[@index]
82
+ label_data = @labels[@index]
83
+ image_data.map! { |b| b.to_f / 255.0 }
84
+ @index += 1
85
+ images << image_data
86
+ labels << (@one_hot ? one_hot_transform(label_data) : label_data.to_f)
87
87
  end
88
88
  [images, labels]
89
89
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mnist-learn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Dayo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-28 00:00:00.000000000 Z
11
+ date: 2018-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -98,6 +98,7 @@ files:
98
98
  - exe/mnist2csv
99
99
  - lib/mnist-learn.rb
100
100
  - lib/mnist-learn/version.rb
101
+ - mnist-learn-0.1.0.gem
101
102
  - mnist-learn.gemspec
102
103
  - script/console
103
104
  - script/setup