Skip to content

Commit

Permalink
device_name="MYRIAD" for Intel NCS2 comment (ultralytics#8327)
Browse files Browse the repository at this point in the history
Display device_name="MYRIAD" for Intel NCS2 option per user question in ultralytics#8154
  • Loading branch information
glenn-jocher authored Jun 24, 2022
1 parent a2a1ed2 commit 724d5b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def __init__(self, weights='yolov5s.pt', device=torch.device('cpu'), dnn=False,
if not Path(w).is_file(): # if not *.xml
w = next(Path(w).glob('*.xml')) # get *.xml file from *_openvino_model dir
network = ie.read_model(model=w, weights=Path(w).with_suffix('.bin'))
executable_network = ie.compile_model(model=network, device_name="CPU")
executable_network = ie.compile_model(network, device_name="CPU") # device_name="MYRIAD" for Intel NCS2
output_layer = next(iter(executable_network.outputs))
meta = Path(w).with_suffix('.yaml')
if meta.exists():
Expand Down

0 comments on commit 724d5b2

Please sign in to comment.