tensorflow.py 0.3.0 → 0.4.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/.gitignore +1 -0
- data/README.md +7 -1
- data/lib/tensorflow.rb +5 -0
- data/tensorflow.py.gemspec +1 -1
- metadata +2 -3
- data/Gemfile.lock +0 -63
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0efce0d1c2dba551eaa730b8d80c207cce60c8c4cbd95f68310cabe14ac5cdc
|
|
4
|
+
data.tar.gz: 3cfaf2a57443c80853e60d26ce2ee62c577f1d35035b077de9e7e55c89a26879
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2078bf7f51cfcd17a795abafa863f3400f1273fe805e41379211766fe58c5e2eea0302c47308db50fd7d38d91ec1bd9f9f28293c006d95d68d378e3371de478
|
|
7
|
+
data.tar.gz: 2baaeb1e088ff51c7e11ee0e1776790959bb750381467b518a53a6b672de713771395df1290faef736fae21a22692501b619bc62bd90dcb3855bbaaffc38fb11
|
data/.gitignore
CHANGED
data/README.md
CHANGED
|
@@ -24,12 +24,18 @@ Or install it yourself as:
|
|
|
24
24
|
require 'tensorflow'
|
|
25
25
|
|
|
26
26
|
tf = TensorFlow
|
|
27
|
-
sess = tf.Session.
|
|
27
|
+
sess = tf.Session.new
|
|
28
28
|
a = tf.placeholder tf.int16
|
|
29
29
|
b = tf.placeholder tf.int16
|
|
30
30
|
add = tf.add(a, b)
|
|
31
31
|
mul = tf.multiply(a, b)
|
|
32
32
|
result = sess.run(add, feed_dict: { a => 2, b => 3 })
|
|
33
|
+
sess.close
|
|
34
|
+
|
|
35
|
+
# block sugar closes the session
|
|
36
|
+
tf.session do |sess|
|
|
37
|
+
sess.run(mul, feed_dict: { a => 2, b => 3 })
|
|
38
|
+
end
|
|
33
39
|
```
|
|
34
40
|
|
|
35
41
|
## Development
|
data/lib/tensorflow.rb
CHANGED
|
@@ -17,4 +17,9 @@ module TensorFlow
|
|
|
17
17
|
def self.respond_to_missing?(method_name, include_private = false)
|
|
18
18
|
_pym.respond_to?(method_name, include_private)
|
|
19
19
|
end
|
|
20
|
+
|
|
21
|
+
def self.session(*args, &block)
|
|
22
|
+
s = self.Session.new(*args)
|
|
23
|
+
block ? yield(s).tap { s.close } : s
|
|
24
|
+
end
|
|
20
25
|
end
|
data/tensorflow.py.gemspec
CHANGED
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
|
+
version: 0.4.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-
|
|
11
|
+
date: 2018-07-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -106,7 +106,6 @@ files:
|
|
|
106
106
|
- ".rspec"
|
|
107
107
|
- ".travis.yml"
|
|
108
108
|
- Gemfile
|
|
109
|
-
- Gemfile.lock
|
|
110
109
|
- LICENSE.txt
|
|
111
110
|
- README.md
|
|
112
111
|
- Rakefile
|
data/Gemfile.lock
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
tensorflow.py (0.3.0)
|
|
5
|
-
ruby.py (~> 0.2)
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
ast (2.4.0)
|
|
11
|
-
coderay (1.1.2)
|
|
12
|
-
diff-lcs (1.3)
|
|
13
|
-
jaro_winkler (1.5.1)
|
|
14
|
-
method_source (0.9.0)
|
|
15
|
-
parallel (1.12.1)
|
|
16
|
-
parser (2.5.1.0)
|
|
17
|
-
ast (~> 2.4.0)
|
|
18
|
-
powerpack (0.1.2)
|
|
19
|
-
pry (0.11.3)
|
|
20
|
-
coderay (~> 1.1.0)
|
|
21
|
-
method_source (~> 0.9.0)
|
|
22
|
-
pycall (1.0.3)
|
|
23
|
-
rainbow (3.0.0)
|
|
24
|
-
rake (10.5.0)
|
|
25
|
-
rspec (3.7.0)
|
|
26
|
-
rspec-core (~> 3.7.0)
|
|
27
|
-
rspec-expectations (~> 3.7.0)
|
|
28
|
-
rspec-mocks (~> 3.7.0)
|
|
29
|
-
rspec-core (3.7.1)
|
|
30
|
-
rspec-support (~> 3.7.0)
|
|
31
|
-
rspec-expectations (3.7.0)
|
|
32
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
33
|
-
rspec-support (~> 3.7.0)
|
|
34
|
-
rspec-mocks (3.7.0)
|
|
35
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
36
|
-
rspec-support (~> 3.7.0)
|
|
37
|
-
rspec-support (3.7.1)
|
|
38
|
-
rubocop (0.57.2)
|
|
39
|
-
jaro_winkler (~> 1.5.1)
|
|
40
|
-
parallel (~> 1.10)
|
|
41
|
-
parser (>= 2.5)
|
|
42
|
-
powerpack (~> 0.1)
|
|
43
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
44
|
-
ruby-progressbar (~> 1.7)
|
|
45
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
|
46
|
-
ruby-progressbar (1.9.0)
|
|
47
|
-
ruby.py (0.2.1)
|
|
48
|
-
pycall
|
|
49
|
-
unicode-display_width (1.4.0)
|
|
50
|
-
|
|
51
|
-
PLATFORMS
|
|
52
|
-
ruby
|
|
53
|
-
|
|
54
|
-
DEPENDENCIES
|
|
55
|
-
bundler (~> 1.16)
|
|
56
|
-
pry
|
|
57
|
-
rake (~> 10.0)
|
|
58
|
-
rspec (~> 3.0)
|
|
59
|
-
rubocop (~> 0.57.2)
|
|
60
|
-
tensorflow.py!
|
|
61
|
-
|
|
62
|
-
BUNDLED WITH
|
|
63
|
-
1.16.2
|