onnx-red-chainer 0.1.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8aa77d35c9473d25f6528d912569b9c87edd9f011ff84e5542590dff65ca4a6
4
- data.tar.gz: ea3066bfb22cb81e82983347419143290347efdc79ebe2cce2d869ad90387de9
3
+ metadata.gz: 94f43f2389bef97d305a708a12fc14f7074ede5e8f03f8ba2b28b3a03271d793
4
+ data.tar.gz: 48c7d1138de1b17429b984a6f2ac96aa101320cdbfc41dc2d818ff595d464b2d
5
5
  SHA512:
6
- metadata.gz: 285dd52ec849dbe6be77653556748e55256e2c1d19fe93c474b782ea54b20154dbc4e23cfa881de69a49522d7fcf12766ea6193a06effe10091c18a4f625c2de
7
- data.tar.gz: 51afc59d523458206594b2f60ee6750ab2212ae106bf28ff8eee3c5e2a35ef7b03c09d1acbb23ab153830d5e2fbdde3bc610675061917a8f8fbadceef3f1e524
6
+ metadata.gz: d774f5a8125ce02dedcf8bd9dbabcd275545b6ffc2ef8c0b201e8df284e296aee1b7f98533f09b8c93fe55ccd030697d401310c88cb050afc61d75a5e51c6f68
7
+ data.tar.gz: f0c84a2c4f398a254a0e7e34523390f496596e7cd157c6e6fa9bc6abc363a10332c8979ae45c0daf4d717aabb1ee9617845efaff6d76ec68bda513e5902f49b2
@@ -0,0 +1 @@
1
+ /pkg/
@@ -0,0 +1,12 @@
1
+ notifications:
2
+ webhooks:
3
+ - https://webhook.commit-email.info/
4
+ sudo: false
5
+ language: ruby
6
+ rvm:
7
+ - 2.4.3
8
+ - 2.5.0
9
+ - 2.6.0
10
+ before_install: gem install bundler
11
+ script:
12
+ - ruby test/run_test.rb
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- onnx-red-chainer (0.1.0)
4
+ onnx-red-chainer (0.1.1)
5
5
  google-protobuf
6
6
  numo-narray
7
7
  red-chainer
@@ -11,8 +11,8 @@ GEM
11
11
  specs:
12
12
  csv (3.0.8)
13
13
  google-protobuf (3.7.1)
14
- minitest (5.11.3)
15
14
  numo-narray (0.9.1.4)
15
+ power_assert (1.1.4)
16
16
  rake (10.5.0)
17
17
  red-chainer (0.4.1)
18
18
  numo-narray (>= 0.9.1.1)
@@ -21,15 +21,17 @@ GEM
21
21
  csv (>= 3.0.5)
22
22
  rubyzip
23
23
  rubyzip (1.2.2)
24
+ test-unit (3.3.2)
25
+ power_assert
24
26
 
25
27
  PLATFORMS
26
28
  ruby
27
29
 
28
30
  DEPENDENCIES
29
31
  bundler (~> 1.17)
30
- minitest (~> 5.0)
31
32
  onnx-red-chainer!
32
33
  rake (~> 10.0)
34
+ test-unit (>= 3.2.9)
33
35
 
34
36
  BUNDLED WITH
35
37
  1.17.2
data/README.md CHANGED
@@ -1,8 +1,5 @@
1
- # Onnx RedChainer
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/onnx/chainer`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
1
+ # ONNX-Red-Chainer
2
+ This is an add-on package for ONNX support by Red Chainer.
6
3
 
7
4
  ## Installation
8
5
 
@@ -22,18 +19,30 @@ Or install it yourself as:
22
19
 
23
20
  ## Usage
24
21
 
25
- TODO: Write usage instructions here
22
+ ```
23
+ $ bundle exec onnx-red-chainer -h
24
+ onnx-red-chainer [OPTIONS] FILE
25
+ -o, --output_dir=OUTPUT_DIR output path
26
+ -m, --model_name=MODEL_NAME Model name
27
+ -h, --help show help
28
+ ```
26
29
 
27
- ## Development
30
+ ### Run Test
28
31
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
32
+ ```
33
+ $ bundle exec ruby test/run_test.rb
34
+ ```
30
35
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
36
+ ## Supported Functions
37
+ ### Activation
38
+ - ReLU
32
39
 
33
- ## Contributing
40
+ ### Connection
41
+ - LinearFunction
34
42
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/onnx-red-chainer.
43
+ ## Development
36
44
 
37
- ## License
38
45
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
46
+ ## License
47
+ The MIT license.
48
+ See [LICENSE.txt](./LICENSE.txt) for details.
@@ -1,7 +1,11 @@
1
1
  require 'chainer'
2
2
  require "onnx-chainer/version"
3
3
  require "onnx-chainer/graph"
4
+
5
+ org_verbose = $VERBOSE
6
+ $VERBOSE = nil
4
7
  require "onnx-chainer/proto/onnx_pb"
8
+ $VERBOSE = org_verbose
5
9
 
6
10
  module OnnxChainer
7
11
  class Error < StandardError; end
@@ -20,8 +20,9 @@ module OnnxChainer
20
20
  opts.on('-m', '--model_name=MODEL_NAME', 'Model name') { |v| @model_name = v }
21
21
  opts.on('-h', '--help', 'show help') { @help = true }
22
22
  end
23
- @onnx_path = argv.pop
23
+
24
24
  @parser.parse!(argv)
25
+ @onnx_path = argv.pop
25
26
  end
26
27
 
27
28
  def run
@@ -95,7 +95,7 @@ s = <<EOS
95
95
  require 'chainer'
96
96
 
97
97
  class #{model_name} < Chainer::Chain
98
- def initialize()
98
+ def initialize
99
99
  super()
100
100
  init_scope do
101
101
  #{@nodes.select(&:need_initialized).map(&:to_initialize_string).join("\n ")}
@@ -1,3 +1,3 @@
1
1
  module OnnxChainer
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_development_dependency "bundler", "~> 1.17"
28
28
  spec.add_development_dependency "rake", "~> 10.0"
29
- spec.add_development_dependency "minitest", "~> 5.0"
29
+ spec.add_development_dependency "test-unit", ">= 3.2.9"
30
30
  end
31
31
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onnx-red-chainer
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
  - hatappi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-11 00:00:00.000000000 Z
11
+ date: 2019-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -81,19 +81,19 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '10.0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: minitest
84
+ name: test-unit
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '5.0'
89
+ version: 3.2.9
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '5.0'
96
+ version: 3.2.9
97
97
  description: Automatically generate Ruby code from ONNX
98
98
  email:
99
99
  - hatappi@hatappi.me
@@ -102,6 +102,8 @@ executables:
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
+ - ".gitignore"
106
+ - ".travis.yml"
105
107
  - Gemfile
106
108
  - Gemfile.lock
107
109
  - LICENSE.txt