class TensorStream::ControlFlow

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/control_flow.rb, line 6
def initialize(flow_type, inputs, ops = nil, options = {})
  setup_initial_state(options)
  @options = options
  @operation = :"flow_#{flow_type}"
  @inputs = inputs
  @name = [@graph.get_name_scope, options[:name] || set_name].compact.join("/")
  @ops = ops
  @consumers = Set.new
  @shape = TensorShape.new([inputs.size])
  @graph.add_node(self)
end

Public Instance Methods

run() click to toggle source
# File lib/tensor_stream/control_flow.rb, line 22
def run
  eval
end
set_data_type(_passed_data_type) click to toggle source
# File lib/tensor_stream/control_flow.rb, line 18
def set_data_type(_passed_data_type)
  :unknown
end