Sha256: 2c3816d452f809777d42abc86b16a4e50de67077fbbb0865df416deafcb67d64

Contents?: true

Size: 674 Bytes

Versions: 3

Compression:

Stored size: 674 Bytes

Contents

module TensorStream
    # Defines a TensorStream controlflow op
    class DynamicStitch < Operation
      attr_accessor :ops
  
      def initialize(flow_type, inputs, ops = nil, options = {})
        setup_initial_state(options)
  
        @operation = :"flow_#{flow_type}"
        @inputs = inputs

        @data_type = Tensor.detect_type(inputs[1])
        @name = [@graph.get_name_scope, options[:name] || set_name].compact.join('/')
        @ops = ops
        @shape = TensorShape.new([inputs.size])
        @graph.add_node(self)
      end
  
      def set_data_type(_passed_data_type)
        :unknown
      end
  
      def run
        eval
      end
    end
  end
  

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tensor_stream-0.7.0 lib/tensor_stream/dynamic_stitch.rb
tensor_stream-0.6.1 lib/tensor_stream/dynamic_stitch.rb
tensor_stream-0.6.0 lib/tensor_stream/dynamic_stitch.rb