Class: Tensorflow::Graph::GraphDefOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/tensorflow/graph/graph_def_options.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGraphDefOptions

Returns a new instance of GraphDefOptions.



10
11
12
13
# File 'lib/tensorflow/graph/graph_def_options.rb', line 10

def initialize
  @pointer = FFI.TF_NewImportGraphDefOptions()
  ObjectSpace.define_finalizer(self, self.class.finalize(@pointer))
end

Class Method Details

.finalize(pointer) ⇒ Object



4
5
6
7
8
# File 'lib/tensorflow/graph/graph_def_options.rb', line 4

def self.finalize(pointer)
  proc do
    FFI.TF_DeleteImportGraphDefOptions(pointer)
  end
end

Instance Method Details

#prefix=(value) ⇒ Object



19
20
21
# File 'lib/tensorflow/graph/graph_def_options.rb', line 19

def prefix=(value)
  FFI.TF_ImportGraphDefOptionsSetPrefix(self, value)
end

#to_ptrObject



15
16
17
# File 'lib/tensorflow/graph/graph_def_options.rb', line 15

def to_ptr
  @pointer
end