Sha256: 01f9cabb8b652e3241dcc8879b21643bf5c382c1ca816c72607502971114ab39

Contents?: true

Size: 570 Bytes

Versions: 16

Compression:

Stored size: 570 Bytes

Contents

module TensorStream
  # Defines a TensorStream controlflow op
  class ControlFlow < Operation
    attr_accessor :ops

    def initialize(flow_type, inputs, ops = nil, options = {})
      setup_initial_state(options)

      @operation = :"flow_#{flow_type}"
      @inputs = inputs
      @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

16 entries across 16 versions & 1 rubygems

Version Path
tensor_stream-0.9.8 lib/tensor_stream/control_flow.rb
tensor_stream-0.9.7 lib/tensor_stream/control_flow.rb
tensor_stream-0.9.6 lib/tensor_stream/control_flow.rb
tensor_stream-0.9.5 lib/tensor_stream/control_flow.rb
tensor_stream-0.9.2 lib/tensor_stream/control_flow.rb
tensor_stream-0.9.1 lib/tensor_stream/control_flow.rb
tensor_stream-0.9.0 lib/tensor_stream/control_flow.rb
tensor_stream-0.8.6 lib/tensor_stream/control_flow.rb
tensor_stream-0.8.5 lib/tensor_stream/control_flow.rb
tensor_stream-0.8.1 lib/tensor_stream/control_flow.rb
tensor_stream-0.8.0 lib/tensor_stream/control_flow.rb
tensor_stream-0.7.0 lib/tensor_stream/control_flow.rb
tensor_stream-0.6.1 lib/tensor_stream/control_flow.rb
tensor_stream-0.6.0 lib/tensor_stream/control_flow.rb
tensor_stream-0.5.1 lib/tensor_stream/control_flow.rb
tensor_stream-0.5.0 lib/tensor_stream/control_flow.rb