Deploy to Android¶
Build model for Android Target¶
Relay compilation of model for android target could follow same approach like android_rpc. The code below will save the compilation output which is required on android target.
lib.export_library("deploy_lib.so", ndk.create_shared) with open("deploy_graph.json", "w") as fo: fo.write(graph.json()) with open("deploy_param.params", "wb") as fo: fo.write(runtime.save_param_dict(params))
deploy_lib.so, deploy_graph.json, deploy_param.params will go to android target.