如何使用 C# 让 Microsof.tML 在 NVDIA GPU 上运行?我按照指示
https://github.com/dotnet/machinelearning/blob/master/docs/api-reference/tensorflow-usage.md
我的管道如下所示。所有版本依赖项(onnxruntime.gpu、Microsoft.ML 等)都是 1.5.2,因此应该支持它,但我得到异常 DllNotFoundException:无法加载 DLL 'onnxruntime' 或其依赖项之一:找不到指定的模块 -是的 onnxruntime 确实出现在已安装的 nuget 包列表中。
有没有人让这个工作?文档仍然很稀疏,并且似乎没有任何在线示例。
var pipeline = context.Transforms.ResizeImages(
resizing: ImageResizingEstimator.ResizingKind.Fill,
outputColumnName: "image", imageWidth: ImageSettings.imageWidth,
imageHeight: ImageSettings.imageHeight,
inputColumnName: nameof(ModelInput.Image)
)
.Append(context.Transforms.ExtractPixels(outputColumnName: "image"))
.Append(context.Transforms.ApplyOnnxModel(
modelFile: "./ObjectDetection/tinyyolov2-8.onnx",
outputColumnName: "grid",
inputColumnName: "image",
gpuDeviceId:0)
);