'Can't create an inference session in onnxruntime

I am not able to create an instance of InferenceSession using onnxruntime. My platform is Mac OS(Big Sur). The code doesn't even throw any exceptions. Process is simply being killed. The same code works perfectly on Windows. Here are the screenshots:

  • The screenshot below represents the absence of exception. My code exits at that line without reaching the "catch" block.

exception absence

  • The screenshot below shows the window I get after the program stops.

enter image description here



Solution 1:[1]

You are probably running out of memory, could you check your memory utilization while you are trying to load the model?

You can use the htop utility.

If you are indeed running out of memory as I suspect you just need more RAM/GPU VRAM.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SnoozingSimian