This application or script uses TorchSharp but doesn't contain a reference to libtorch-cpu-11.3-win-x64, Version=1.11.0.1
See original GitHub issueHaving some trouble using Torchsharp in a C# .Net 4.8 project. I’d show you some source code but this is as far as i’ve gotten:
TryInitializeDeviceType(TorchSharp.DeviceType.CPU);
Replacing this code with any other code from Torchsharp-library creates the same result and error.
I’m using the Torchsharp-cpu nuget package, and I’ve tried using Torchsharp with the libtorch-cpu-11.3-win-x64 package and its dependencies as well without any luck.
My packages.config includes these:
<package id="libtorch-cpu" version="1.13.0.1" targetFramework="net48" /> <package id="libtorch-cpu-linux-x64" version="1.13.0.1" targetFramework="net48" /> <package id="libtorch-cpu-osx-x64" version="1.13.0.1" targetFramework="net48" /> <package id="libtorch-cpu-win-x64" version="1.13.0.1" targetFramework="net48" />
And I’ve tried using the exact 1.11.0 version with no luck as well.
Not really sure how to proceed to make it work here.
Issue Analytics
- State:
- Created 7 months ago
- Comments:36 (32 by maintainers)
For now, I’m going to add a runtime check that we’re running in 64-bit mode before trying to load DLLs. That should at least help by generating a more directly understandable error message. Still won’t address the core issue.
This worked in my test project!