Class: Tensorflow::Graph::SessionOptions
- Inherits:
-
Object
- Object
- Tensorflow::Graph::SessionOptions
- Defined in:
- lib/tensorflow/graph/session.rb
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ SessionOptions
constructor
A new instance of SessionOptions.
- #to_ptr ⇒ Object
Constructor Details
#initialize ⇒ SessionOptions
Returns a new instance of SessionOptions.
11 12 13 14 |
# File 'lib/tensorflow/graph/session.rb', line 11 def initialize @pointer = FFI.TF_NewSessionOptions ObjectSpace.define_finalizer(self, self.class.finalize(@pointer)) end |
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
4 5 6 |
# File 'lib/tensorflow/graph/session.rb', line 4 def target @target end |
Class Method Details
.finalize(pointer) ⇒ Object
5 6 7 8 9 |
# File 'lib/tensorflow/graph/session.rb', line 5 def self.finalize(pointer) proc do FFI.TF_DeleteSessionOptions(pointer) end end |
Instance Method Details
#to_ptr ⇒ Object
16 17 18 |
# File 'lib/tensorflow/graph/session.rb', line 16 def to_ptr @pointer end |