- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there some kind of function that can be used to unload a model when using a myriad in NCS2 mode?
Currently I use the following code to load a model
img = "path to img"
model_xml = "path"
model_bin = "path"
ie = IECore()
net = ie.read_network(model=model_xml, weights=model_bin)
input_blob = next(iter(net.input_info))
device = 'MYRIAD'
exec_net = ie.load_network(network=net, device_name=device)
And this to use it
(exec_net.infer(inputs={input_blob: img})
But if I try to load a model after this the myriad is no longer available for use, I'm presuming this is because there's some kind of wait before the previous network is unloaded. Which leads me to my question, is there a way to have it unload myself so its always available when I need it?
To be clear I get an error trying to use the myriad directly after another network finishes, and it doesn't show up when I try to print available devices with this
print("Available devices:", ie.available_devices)
If my idea of "flushing" the myriad isn't the proper one is there any other way to accomplish what I need? Or do I need to just make a while loop waiting for it to be available again.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
The NCS2 does require some time to load and unload which the time taken depends on the model you are using and its optimization.
Maybe you could try to put on some delay instead of immediately running new inference.
Sincerely,
Iffa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question
Sincerely,
Iffa

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page