新版Outlook将增四大功能 推Android版客户端(Outlook主要功能)
757
2022-05-30
官方文档:
https://pytorch.org/mobile/Android/
转换模型:
import torch
import torchvision
from torch.utils.mobile_optimizer import optimize_for_mobile
model = torchvision.models.mobilenet_v2(pretrained=True)
model.eval()
example = torch.rand(1, 3, 224, 224)
traced_script_module = torch.jit.trace(model, example)
traced_script_module_optimized = optimize_for_mobile(traced_script_module)
traced_script_module_optimized._save_for_lite_interpreter("app/src/main/assets/model.ptl")
有demo,有yolov5:
https://github.com/pytorch/android-demo-app
D2go
D2Go demonstrates a Python script that creates the much lighter and much faster Facebook
Android pytorch
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。