所以我有一个预训练的 pytorch 模型,我保存了模型和参数以防万一,但我需要在 C 或 C++ 代码中使用这个模型,有人知道我该怎么做吗?
非常感谢。
最佳答案
试试 pytorch 1.0,它包含一个 c++ 库。该模型可以导出为 torch 脚本格式并以 C++ 加载,请在此处查看 https://pytorch.org/tutorials/advanced/cpp_export.html
关于c - 在 C 中使用预训练的 pytorch 模型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51657294/