Class: TensorStream::DynamicStitch
- Defined in:
- lib/tensor_stream/dynamic_stitch.rb
Overview
Defines a TensorStream controlflow op
Instance Attribute Summary collapse
-
#ops ⇒ Object
Returns the value of attribute ops.
Attributes inherited from Operation
#inputs, #name, #operation, #options, #outputs, #rank
Attributes inherited from Tensor
#breakpoint, #consumers, #data_type, #device, #given_name, #graph, #internal, #is_const, #name, #native_buffer, #outputs, #rank, #shape, #source, #value
Instance Method Summary collapse
-
#initialize(flow_type, inputs, ops = nil, options = {}) ⇒ DynamicStitch
constructor
A new instance of DynamicStitch.
- #run ⇒ Object
- #set_data_type(_passed_data_type) ⇒ Object
Methods inherited from Operation
#infer_const, #op, #to_h, #to_math, #to_s
Methods inherited from Tensor
#!=, #%, #*, #**, #+, #-, #-@, #/, #<, #<=, #==, #>, #>=, #[], #and, #auto_math, #breakpoint!, cast_dtype, #ceil, #collect, detect_type, #dot, #dtype, #eval, #first, #floor, #internal?, #matmul, #op, #print!, #reduce, reset_counters, #to_a, #to_f, #to_h, #to_i, #to_math, #to_s, #zero?
Methods included from OpHelper
#_op, #cons, #format_source, #fp_type?, #i_cons, #i_op, #int_type?, #reduced_shape, #shape_eval, #shape_full_specified, #shapes_fully_specified_and_equal
Constructor Details
#initialize(flow_type, inputs, ops = nil, options = {}) ⇒ DynamicStitch
Returns a new instance of DynamicStitch.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/tensor_stream/dynamic_stitch.rb', line 6 def initialize(flow_type, inputs, ops = nil, = {}) setup_initial_state() @operation = :"flow_#{flow_type}" @inputs = inputs @data_type = Tensor.detect_type(inputs[1]) @name = [@graph.get_name_scope, [:name] || set_name].compact.join('/') @ops = ops @shape = TensorShape.new([inputs.size]) @graph.add_node(self) end |
Instance Attribute Details
#ops ⇒ Object
Returns the value of attribute ops.
4 5 6 |
# File 'lib/tensor_stream/dynamic_stitch.rb', line 4 def ops @ops end |
Instance Method Details
#run ⇒ Object
23 24 25 |
# File 'lib/tensor_stream/dynamic_stitch.rb', line 23 def run eval end |
#set_data_type(_passed_data_type) ⇒ Object
19 20 21 |
# File 'lib/tensor_stream/dynamic_stitch.rb', line 19 def set_data_type(_passed_data_type) :unknown end |