如何使用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: Unable to load 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)
);发布于 2020-10-20 02:14:25
好的-回答我自己的问题不是很好,但上面说你必须使用Cuda 10的链接似乎不准确。如果您使用的是CUDA1.5Nuget版本,则需要ML.net 10.2。
除非你从源代码开始构建,否则11是不会工作的(谁有时间做这件事)。
希望这能解决这个问题,但如果你打算发表评论,请也这么做!
https://stackoverflow.com/questions/64426308
复制相似问题