Sha256: ffe756e0ed8e80e4849ca47faaf63aae4fabe517f1d04d0a2738a4985b8eadc6

Contents?: true

Size: 490 Bytes

Versions: 2

Compression:

Stored size: 490 Bytes

Contents

module TensorStream
  class ControlFlow < Operation
    attr_accessor :ops

    def initialize(flow_type, items, ops = nil, options = {})
      @operation = :"flow_#{flow_type}"
      @items = items
      @name = set_name
      @ops = ops
      @source = set_source(caller_locations)
      @graph = options[:graph] || TensorStream.get_default_graph
      @graph.add_node(self)
    end

    def set_data_type(passed_data_type)
      :unknown
    end

    def run
      eval
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tensor_stream-0.1.1 lib/tensor_stream/control_flow.rb
tensor_stream-0.1.0 lib/tensor_stream/control_flow.rb