Closed aisnote closed 3 years ago
@aisnote - do you have the debugger output? There's usually more helpful text in the output window. The callstack alone isn't enough to help here since any model loading issue will fail with this stack. There was a version check that was added in 19041 that may be causing this. Older version would potentially permit model versions that they didn't understand, which is why some models worked, but it couldn't be guaranteed to work so we needed to add the version check.
I'm closing because this isn't actionable as-is, but feel free to re-open if you have more data. Thanks!
I'm submitting a…
Works well on 18362, 17663 build. But failed on 19041 build.
Current behavior
Expected behavior
Minimal reproduction of the problem with instructions
Environment
Windows Build Number: 19041
App min and target version: 17663
OS Version (Server, IoT Core, Desktop, etc): Windows10
Graphics Driver version:
DxDiag:
WinMLTools specific:
Visual Studio
call stack:
WinRT_AI_ObjectDetection.exe!winrt::impl::consume_Windows_AI_MachineLearning_ILearningModelSessionFactorywinrt::Windows::AI::MachineLearning::ILearningModelSessionFactory::CreateFromModelOnDevice(const winrt::Windows::AI::MachineLearning::LearningModel & model, const winrt::Windows::AI::MachineLearning::LearningModelDevice & deviceToRunOn) Line 250 C++ WinRT_AI_ObjectDetection.exe!winrt::Windows::AI::MachineLearning::LearningModelSession::(const winrt::Windows::AI::MachineLearning::ILearningModelSessionFactory & f) Line 2001 C++
WinRT_AI_ObjectDetection.exe!winrt::impl::factory_cache_entrywinrt::Windows::AI::MachineLearning::LearningModelSession,winrt::Windows::AI::MachineLearning::ILearningModelSessionFactory::call<winrt::Windows::AI::MachineLearning::LearningModelSession (const winrt::Windows::AI::MachineLearning::ILearningModelSessionFactory &) &>(winrt::Windows::AI::MachineLearning::LearningModelSession::winrt::Windows::AI::MachineLearning::LearningModelSession (const winrt::Windows::AI::MachineLearning::ILearningModelSessionFactory &) & callback) Line 6175 C++
WinRT_AI_ObjectDetection.exe!winrt::impl::call_factory<winrt::Windows::AI::MachineLearning::LearningModelSession,winrt::Windows::AI::MachineLearning::ILearningModelSessionFactory,winrt::Windows::AI::MachineLearning::LearningModelSession (const winrt::Windows::AI::MachineLearning::ILearningModelSessionFactory &) >(winrt::Windows::AI::MachineLearning::LearningModelSession::winrt::Windows::AI::MachineLearning::LearningModelSession (const winrt::Windows::AI::MachineLearning::ILearningModelSessionFactory &) && callback) Line 6197 C++
WinRT_AI_ObjectDetection.exe!winrt::Windows::AI::MachineLearning::LearningModelSession::LearningModelSession(const winrt::Windows::AI::MachineLearning::LearningModel & model, const winrt::Windows::AI::MachineLearning::LearningModelDevice & deviceToRunOn) Line 2001 C++
catch (winrt::hresult_error const& ex) { winrt::hresult hr = ex.to_abi(); printf("load model from RES failed by hr = %x\n", hr); }
error = 80070057: The parameter is incorrect.
my code: session = LearningModelSession{ model, LearningModelDevice(deviceKind) };