module Tf

keep in alphabetical order

Generated by `rake generate_ops`

Constants

VERSION

Attributes

ffi_lib[RW]

Public Class Methods

constant(value, dtype: nil, shape: nil) click to toggle source
# File lib/tensorflow.rb, line 84
def constant(value, dtype: nil, shape: nil)
  Tensor.new(value, dtype: dtype, shape: shape)
end
convert_to_tensor(value, dtype: nil) click to toggle source
# File lib/tensorflow.rb, line 88
def convert_to_tensor(value, dtype: nil)
  value = Tensor.new(value, dtype: dtype) unless value.is_a?(Tensor)
  if dtype && value.dtype != dtype
    raise Error, "Tensor conversion requested dtype #{dtype} for Tensor with dtype #{value.dtype}"
  end
  value
end
library_version() click to toggle source
# File lib/tensorflow.rb, line 80
def library_version
  FFI.TF_Version
end