parent
926be83568
commit
d4d460101d
@ -63,18 +63,6 @@ def main():
|
|||||||
# Read IR
|
# Read IR
|
||||||
log.info("Loading network files:\n\t{}\n\t{}".format(model_xml, model_bin))
|
log.info("Loading network files:\n\t{}\n\t{}".format(model_xml, model_bin))
|
||||||
net = ie.read_network(model=model_xml, weights=model_bin)
|
net = ie.read_network(model=model_xml, weights=model_bin)
|
||||||
func = ng.function_from_cnn(net)
|
|
||||||
|
|
||||||
if "CPU" in args.device:
|
|
||||||
supported_layers = ie.query_network(net, "CPU")
|
|
||||||
ops = func.get_ordered_ops()
|
|
||||||
not_supported_layers = [op.friendly_name for op in ops if op.friendly_name not in supported_layers]
|
|
||||||
if len(not_supported_layers) != 0:
|
|
||||||
log.error("Following layers are not supported by the plugin for specified device {}:\n {}".
|
|
||||||
format(args.device, ', '.join(not_supported_layers)))
|
|
||||||
log.error("Please try to specify cpu extensions library path in sample's command line parameters using -l "
|
|
||||||
"or --cpu_extension command line argument")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
assert len(net.input_info.keys()) == 1, "Sample supports only single input topologies"
|
assert len(net.input_info.keys()) == 1, "Sample supports only single input topologies"
|
||||||
assert len(net.outputs) == 1, "Sample supports only single output topologies"
|
assert len(net.outputs) == 1, "Sample supports only single output topologies"
|
||||||
|
@ -108,18 +108,7 @@ def main():
|
|||||||
# Read IR
|
# Read IR
|
||||||
log.info("Loading network files:\n\t{}\n\t{}".format(model_xml, model_bin))
|
log.info("Loading network files:\n\t{}\n\t{}".format(model_xml, model_bin))
|
||||||
net = ie.read_network(model=model_xml, weights=model_bin)
|
net = ie.read_network(model=model_xml, weights=model_bin)
|
||||||
func = ng.function_from_cnn(net)
|
|
||||||
|
|
||||||
if "CPU" in args.device:
|
|
||||||
supported_layers = ie.query_network(net, "CPU")
|
|
||||||
ops = func.get_ordered_ops()
|
|
||||||
not_supported_layers = [op.friendly_name for op in ops if op.friendly_name not in supported_layers]
|
|
||||||
if len(not_supported_layers) != 0:
|
|
||||||
log.error("Following layers are not supported by the plugin for specified device {}:\n {}".
|
|
||||||
format(args.device, ', '.join(not_supported_layers)))
|
|
||||||
log.error("Please try to specify cpu extensions library path in sample's command line parameters using -l "
|
|
||||||
"or --cpu_extension command line argument")
|
|
||||||
sys.exit(1)
|
|
||||||
assert len(net.input_info.keys()) == 1, "Sample supports only single input topologies"
|
assert len(net.input_info.keys()) == 1, "Sample supports only single input topologies"
|
||||||
assert len(net.outputs) == 1, "Sample supports only single output topologies"
|
assert len(net.outputs) == 1, "Sample supports only single output topologies"
|
||||||
|
|
||||||
|
@ -73,16 +73,6 @@ def main():
|
|||||||
if args.cpu_extension and "CPU" in args.device:
|
if args.cpu_extension and "CPU" in args.device:
|
||||||
ie.add_extension(args.cpu_extension, "CPU")
|
ie.add_extension(args.cpu_extension, "CPU")
|
||||||
log.info("CPU extension loaded: {}".format(args.cpu_extension))
|
log.info("CPU extension loaded: {}".format(args.cpu_extension))
|
||||||
|
|
||||||
if "CPU" in args.device:
|
|
||||||
supported_layers = ie.query_network(net, "CPU")
|
|
||||||
not_supported_layers = [op.friendly_name for op in ops if op.friendly_name not in supported_layers]
|
|
||||||
if len(not_supported_layers) != 0:
|
|
||||||
log.error("Following layers are not supported by the plugin for specified device {}:\n {}".
|
|
||||||
format(args.device, ', '.join(not_supported_layers)))
|
|
||||||
log.error("Please try to specify cpu extensions library path in sample's command line parameters using -l "
|
|
||||||
"or --cpu_extension command line argument")
|
|
||||||
sys.exit(1)
|
|
||||||
# -----------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# --------------------------- 3. Read and preprocess input --------------------------------------------
|
# --------------------------- 3. Read and preprocess input --------------------------------------------
|
||||||
|
@ -67,18 +67,6 @@ def main():
|
|||||||
# Read IR
|
# Read IR
|
||||||
log.info("Loading network files:\n\t{}\n\t{}".format(model_xml, model_bin))
|
log.info("Loading network files:\n\t{}\n\t{}".format(model_xml, model_bin))
|
||||||
net = ie.read_network(model=model_xml, weights=model_bin)
|
net = ie.read_network(model=model_xml, weights=model_bin)
|
||||||
func = ng.function_from_cnn(net)
|
|
||||||
|
|
||||||
if "CPU" in args.device:
|
|
||||||
supported_layers = ie.query_network(net, "CPU")
|
|
||||||
ops = func.get_ordered_ops()
|
|
||||||
not_supported_layers = [op.friendly_name for op in ops if op.friendly_name not in supported_layers]
|
|
||||||
if len(not_supported_layers) != 0:
|
|
||||||
log.error("Following layers are not supported by the plugin for specified device {}:\n {}".
|
|
||||||
format(args.device, ', '.join(not_supported_layers)))
|
|
||||||
log.error("Please try to specify cpu extensions library path in sample's command line parameters using -l "
|
|
||||||
"or --cpu_extension command line argument")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
assert len(net.input_info.keys()) == 1, "Sample supports only single input topologies"
|
assert len(net.input_info.keys()) == 1, "Sample supports only single input topologies"
|
||||||
assert len(net.outputs) == 1, "Sample supports only single output topologies"
|
assert len(net.outputs) == 1, "Sample supports only single output topologies"
|
||||||
|
Loading…
Reference in New Issue
Block a user