class TensorStream::DynamicStitch
Defines a TensorStream
controlflow op
Attributes
ops[RW]
Public Class Methods
new(flow_type, inputs, ops = nil, options = {})
click to toggle source
# File lib/tensor_stream/dynamic_stitch.rb, line 6 def initialize(flow_type, inputs, ops = nil, options = {}) setup_initial_state(options) @operation = :"flow_#{flow_type}" @options = options.merge(n: inputs[0].size) @inputs = inputs.flatten(1).map { |i| TensorStream.convert_to_tensor(i) }.map { |i| i ? i.op : nil } @consumers = Set.new @data_type = Tensor.detect_type(inputs[1]) @name = [@graph.get_name_scope, options[:name] || set_name].compact.join("/") @ops = ops @shape = TensorShape.new(nil) @graph.add_node(self) end
Public Instance Methods
run()
click to toggle source
# File lib/tensor_stream/dynamic_stitch.rb, line 25 def run eval end
set_data_type(_passed_data_type)
click to toggle source
# File lib/tensor_stream/dynamic_stitch.rb, line 21 def set_data_type(_passed_data_type) :unknown end