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[])