Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AndroidでTensorflow

nakawai
September 30, 2017

 AndroidでTensorflow

nakawai

September 30, 2017
Tweet

More Decks by nakawai

Other Decks in Programming

Transcript

  1. “When we started building TensorFlow, supporting mobile devices was a

    top priority.” https://developers-jp.googleblog.com/2016/07/tensorflow-v09.html
  2. Python と Java(Android)のAPI対応 Python(1.2.1) tf-android (1.2.0) Graphの 読み込み def =

    tf.GraphDef() def.ParseFromString(f.read()) tf.import_graph_def(def, name='') new (AssetManager, “file://android_asset/xxxxx”) Placeholderへ の入力 feed_dict={“x:0”, nparray} #feed(“x”, float[], 1, w, h, 3) 処理の実行と 出力の取得 result = session.run("out_conv7:0", feed_dict) #run({“out_conv7”}, boolean) #fetch(“out_conv7”, int[])