lib/tensor_stream/utils.rb
##
# List available evaluators + devices in the current local environment
# Returns:
# - An array containing the names of those devices
List available evaluators + devices in the current local environment
Returns:
An array containing the names of those devices
List available evaluators + devices in the current local environment Returns : An array containing the names of those devices
def list_local_devices
      local_name = 'job:localhost'
      TensorStream::Evaluator.evaluators.collect do |k, v|
        v[:class].query_supported_devices.collect do |device_str|
          [local_name, "ts:#{k}:#{device_str.name}"].join('/')
        end
      end.flatten
    end
def list_local_devices local_name = 'job:localhost' TensorStream :: Evaluator . evaluators . collect do | k , v | v [ :class ] . query_supported_devices . collect do | device_str | [ local_name , "ts:#{k}:#{device_str.name}" ] . join ( '/' ) end end . flatten end
List available evaluators + devices in the current local environment
Returns:
 An array containing the names of those devices
List available evaluators + devices in the current local environment Returns : An array containing the names of those devices