+
95
-

如何将训练好的ai模型转换成wsam在浏览器中运行?

如何将训练好的ai模型转换成wsam在浏览器中运行?


网友回复

+
15
-

可以使用ONNX

先使用ONNX将pytorch或则TensorFlow训练好的模型转成onnx格式文件

pip install onnx

imprt torch
import torchvision

# Load the trained PyTorch model
model = torchvision.models.resnet18(pretrained=True)

# Export the model to ONNX format
input_shape...

点击查看剩余70%

我知道答案,我要回答