class Tensorflow::Graph::OperationOutput
Attributes
operation[R]
output[R]
Public Class Methods
from_graph(graph, pointer)
click to toggle source
# File lib/tensorflow/graph/operation_output.rb, line 18 def self.from_graph(graph, pointer) output = FFI::Output.new(pointer) operation = Operation.new(graph, output[:oper]) self.new(operation, output) end
from_index(operation, index)
click to toggle source
# File lib/tensorflow/graph/operation_output.rb, line 11 def self.from_index(operation, index) output = FFI::Output.new output[:index] = index output[:oper] = operation self.new(operation, output) end
from_pointer(operation, pointer)
click to toggle source
# File lib/tensorflow/graph/operation_output.rb, line 6 def self.from_pointer(operation, pointer) output = FFI::Output.new(pointer) self.new(operation, output) end
new(operation, output)
click to toggle source
# File lib/tensorflow/graph/operation_output.rb, line 24 def initialize(operation, output) @operation = operation @output = output end
Public Instance Methods
index()
click to toggle source
# File lib/tensorflow/graph/operation_output.rb, line 33 def index self.output[:index] end
to_ptr()
click to toggle source
# File lib/tensorflow/graph/operation_output.rb, line 29 def to_ptr @output.to_ptr end
to_s()
click to toggle source
Calls superclass method
# File lib/tensorflow/graph/operation_output.rb, line 37 def to_s if self.output result = [self.operation.op_type] result << "name=#{self.operation.name}" result << "#{self.index}:(shape=#{self.operation.output_shapes[self.index]}, dtype=#{self.operation.output_types[self.index]})" result.join(', ') else super end end