Sha256: 3335ee70d92bce9c4f9e7fae048f9e971174fe78ebd4d8315c7e492eeb843aa6

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

module TensorStream
  class EvaluatorUtils
    extend TensorStream::StringHelper

    def self.get_evaluator_classes(evaluators)
      @evaluator_classes ||= if evaluators.is_a?(Array)
        if evaluators.empty?
          TensorStream::Evaluator.default_evaluators
        else
          evaluators.collect { |name| Object.const_get("TensorStream::Evaluator::#{camelize(name.to_s)}") }
        end
      elsif evaluators.nil?
        TensorStream::Evaluator.default_evaluators
      else
        [Object.const_get("TensorStream::Evaluator::#{camelize(evaluators.to_s)}")]
      end
      @evaluator_classes
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tensor_stream-1.0.9 lib/tensor_stream/evaluator/evaluator_utils.rb