Skip to content

MRuby binding for TensorFlow Lite

Notifications You must be signed in to change notification settings

ojej/mruby-tflite

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mruby-tflite

interface to TensorFlow Lite for mruby

Usage

model = TfLite::Model.from_file "xor_model.tflite"
interpreter = TfLite::Interpreter.new(model)
interpreter.allocate_tensors
input = interpreter.input_tensor(0)
output = interpreter.output_tensor(0)
[[0,0], [1,0], [0,1], [1,1]].each do |x|
  input.data = x
  interpreter.invoke
  puts output.data[0].round
end

Requirements

  • TensorFlow Lite

License

MIT

Author

Yasuhiro Matsumoto (a.k.a. mattn)

About

MRuby binding for TensorFlow Lite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 72.5%
  • Ruby 17.2%
  • Python 10.3%