fix cpu fallback for extractor

This commit is contained in:
iperov 2019-02-28 14:54:59 +04:00
parent 8f2e69ab27
commit 46f4d6c426

View file

@ -193,6 +193,9 @@ class ExtractSubprocessor(Subprocessor):
io.progress_bar_close() io.progress_bar_close()
def get_devices_for_type (self, type, multi_gpu, cpu_only): def get_devices_for_type (self, type, multi_gpu, cpu_only):
if 'cpu' in nnlib.device.backend:
cpu_only = True
if not cpu_only and (type == 'rects' or type == 'landmarks'): if not cpu_only and (type == 'rects' or type == 'landmarks'):
if type == 'rects' and self.detector == 'mt' and nnlib.device.backend == "plaidML": if type == 'rects' and self.detector == 'mt' and nnlib.device.backend == "plaidML":
cpu_only = True cpu_only = True