PytorchStreamReader 在 C# 中定位文件 constants.pkl 失败

问题描述 投票:0回答:0

我正在尝试使用 TorchSharp 库在 c# 中加载由 yolov5 和 yolov7 生成的模型。 问题是我仍然收到这个错误

System.Runtime.InteropServices.ExternalException: 'PytorchStreamReader failed locating file constants.pkl: file not found

但是当我查看培训文件夹时,没有

.pkl
文件。我在互联网上找到了一些东西,但不确定该怎么做。

例如我试过

                var model = torch.load(filename);
// AND
                var model = torch.jit.load(filename);

但两者都给了我同样的错误。请问我该怎么办?

c# deep-learning pytorch yolo ml.net
© www.soinside.com 2019 - 2024. All rights reserved.