tensorflow.py 0.5.0 → 0.5.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 +4 -4
- data/lib/tensorflow.rb +4 -2
- data/tensorflow.py.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e36db1d315c327e45b8968a3d9d234d14b4753aa7f5490c15994bb2e44016949
|
|
4
|
+
data.tar.gz: 708b4a4c09502c461362bed5d99f9f951eecc5d9d5f3b99cffde1124061af15c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06d3a91eb056584f8406f64913eddfedd3f40d0a3020489c0174dd99b84afb93d3ac3b19f6ce767176783198ca06a9dae08068852be1e2ee12d913bfa4e56cf3
|
|
7
|
+
data.tar.gz: f30112751d016f0482338aa8374f91782d54964fc6a84618dd17c88e1b451dce868266c5a8d3554392ab64a0c85c6a50f19d30886d89ac07c0be45c5eb554458
|
data/lib/tensorflow.rb
CHANGED
|
@@ -5,8 +5,10 @@ TensorFlow = RubyPy.import('tensorflow')
|
|
|
5
5
|
|
|
6
6
|
# Enhance the module's Ruby API.
|
|
7
7
|
module TensorFlow
|
|
8
|
+
# Pass a tf.Session() to a block and auto-close it.
|
|
8
9
|
def self.session(*args, &block)
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
sess = self.Session.new(*args)
|
|
11
|
+
return(sess) unless block
|
|
12
|
+
begin; yield(sess); ensure; sess.close; end
|
|
11
13
|
end
|
|
12
14
|
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.5.
|
|
4
|
+
version: 0.5.1
|
|
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-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|