Skip to content
MRuby binding for TensorFlow Lite
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example First import Apr 17, 2019
src Merge branch 'master' of github.com:mattn/mruby-tflite Apr 25, 2019
test
.gitignore First import Apr 17, 2019
README.md
mrbgem.rake Feedback from https://qiita.com/akuroda/items/e3d509f75713a55ae22e Apr 22, 2019

README.md

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)

You can’t perform that action at this time.