Sha256: dbe0659ce50cb539e691c3267561a15fff67e4fb6cbef08f695b649ed044c73e

Contents?: true

Size: 372 Bytes

Versions: 1

Compression:

Stored size: 372 Bytes

Contents

module TensorFlow
  module Utils
    def self.check_status(status)
      if FFI.TF_GetCode(status) != 0
        raise Error, FFI.TF_Message(status)
      end
    end

    def self.infer_type(value)
      case value
      when String
        :string
      when Float
        :float
      when true, false
        :bool
      else
        :int32
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tensorflow-0.1.0 lib/tensorflow/utils.rb