gotorch icon indicating copy to clipboard operation
gotorch copied to clipboard

如何保存训练好的模型与加载?

Open jtyoui opened this issue 8 months ago • 3 comments

jtyoui avatar Apr 13 '25 10:04 jtyoui

你好jtyoui:

我在另一个项目tnn中对神经网络进行了基本的封装,实现了模型的保存和加载功能,可看示例: https://github.com/lwch/tnn/tree/gotorch/example/xor

lwch avatar May 02 '25 10:05 lwch

@lwch 可以了 多谢 但是我的Window上只能使用CPU,无法使用CUDA,这个是为什么?

jtyoui avatar May 02 '25 10:05 jtyoui

github未提供带windows的CUDA编译环境,因此pipeline中未包含windows版本的libgotorch库,可通过自行编译的方式生成支持CUDA的gotorch.dll,详见文档: https://github.com/lwch/gotorch/blob/master/docs/libgotorch.md#windows%E7%B3%BB%E7%BB%9F

lwch avatar May 02 '25 11:05 lwch