tensorflow.py 0.4.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0efce0d1c2dba551eaa730b8d80c207cce60c8c4cbd95f68310cabe14ac5cdc
4
- data.tar.gz: 3cfaf2a57443c80853e60d26ce2ee62c577f1d35035b077de9e7e55c89a26879
3
+ metadata.gz: 0c5bd3413dcb154de3e97491584772087f10c881792c21974f2da519ab6ee141
4
+ data.tar.gz: 6fc8381d67467e13d05eef3c20a5295a1ea41b2075b3475150f490cc3cf94827
5
5
  SHA512:
6
- metadata.gz: a2078bf7f51cfcd17a795abafa863f3400f1273fe805e41379211766fe58c5e2eea0302c47308db50fd7d38d91ec1bd9f9f28293c006d95d68d378e3371de478
7
- data.tar.gz: 2baaeb1e088ff51c7e11ee0e1776790959bb750381467b518a53a6b672de713771395df1290faef736fae21a22692501b619bc62bd90dcb3855bbaaffc38fb11
6
+ metadata.gz: 96cde7dece653430b16a175d362d3b60f57f3abe3088e0d52b20e1d8b8758aabb9bfe1f4a4f430571f9e7d41c9153fb05c49a24a4e232e3cff30d7285a186cc6
7
+ data.tar.gz: 12563d642c34c5c3dfcb1adc54be3c379f697d0b023815a47699421890e5b501e48837f9aabbdc694c9a3eabe6258110f5755a0adc733f61db20f188abe0df7a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # CV2
2
2
 
3
- Ruby wrapper for the Python TensorFlow API.
3
+ Ruby wrapper for the Python TensorFlow API using PyCall via RubyPy.
4
4
 
5
5
  ## Installation
6
6
 
@@ -1,23 +1,10 @@
1
1
  require 'ruby.py'
2
2
 
3
3
  # Top-level module to expose Python 'tensorflow' API to Ruby.
4
- module TensorFlow
5
- def self._pym
6
- @_pym ||= RubyPy.import('tensorflow')
7
- end
8
-
9
- def self.method_missing(method_name, *arguments, &block)
10
- if respond_to_missing?(method_name)
11
- _pym.send(method_name, *arguments, &block)
12
- else
13
- super
14
- end
15
- end
16
-
17
- def self.respond_to_missing?(method_name, include_private = false)
18
- _pym.respond_to?(method_name, include_private)
19
- end
4
+ TensorFlow = RubyPy.import('tensorflow')
20
5
 
6
+ # Enhance the module's Ruby API.
7
+ module TensorFlow
21
8
  def self.session(*args, &block)
22
9
  s = self.Session.new(*args)
23
10
  block ? yield(s).tap { s.close } : s
@@ -3,12 +3,11 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'tensorflow.py'
6
- spec.version = '0.4.0'
6
+ spec.version = '0.5.0'
7
7
  spec.authors = ['Frank J. Cameron']
8
8
  spec.email = ['fjc@fastmail.net']
9
9
 
10
- spec.summary = 'Ruby wrapper for the Python TensorFlow API.'
11
- spec.description = ''
10
+ spec.summary = 'Ruby (PyCall/RubyPy) wrapper for the TensorFlow API.'
12
11
  spec.homepage = 'https://gitlab.com/fjc/ruby-tensorflow.py'
13
12
  spec.license = 'MIT'
14
13
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tensorflow.py
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank J. Cameron
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-07 00:00:00.000000000 Z
11
+ date: 2018-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,7 +94,7 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.2'
97
- description: ''
97
+ description:
98
98
  email:
99
99
  - fjc@fastmail.net
100
100
  executables: []
@@ -136,5 +136,5 @@ rubyforge_project:
136
136
  rubygems_version: 2.7.6
137
137
  signing_key:
138
138
  specification_version: 4
139
- summary: Ruby wrapper for the Python TensorFlow API.
139
+ summary: Ruby (PyCall/RubyPy) wrapper for the TensorFlow API.
140
140
  test_files: []