Skip to content

Commit 1a7539a

Browse files
authored
Merge pull request #3155 from anzhella-pankratova/python_demos_rename_configuration_api
Python demos: update API configuration
2 parents bf766bd + ed24d60 commit 1a7539a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

demos/3d_segmentation_demo/python/3d_segmentation_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,10 @@ def main():
253253
if args.path_to_extension:
254254
core.add_extension(args.path_to_extension, "CPU")
255255
if args.number_threads is not None:
256-
core.set_config({'CPU_THREADS_NUM': str(args.number_threads)}, "CPU")
256+
core.set_property("CPU", {'CPU_THREADS_NUM': str(args.number_threads)})
257257
elif 'GPU' in args.target_device:
258258
if args.path_to_cldnn_config:
259-
core.set_config({'CONFIG_FILE': args.path_to_cldnn_config}, "GPU")
259+
core.set_property("GPU", {'CONFIG_FILE': args.path_to_cldnn_config})
260260
else:
261261
raise AttributeError("Device {} do not support of 3D convolution. "
262262
"Please use CPU, GPU or HETERO:*CPU*, HETERO:*GPU*")

demos/action_recognition_demo/python/action_recognition_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def main():
8989

9090
if 'MYRIAD' in args.device:
9191
myriad_config = {'MYRIAD_ENABLE_HW_ACCELERATION': 'YES'}
92-
core.set_config(myriad_config, 'MYRIAD')
92+
core.set_property('MYRIAD', myriad_config)
9393

9494
decoder_target_device = 'CPU'
9595
if args.device != 'CPU':

demos/handwritten_text_recognition_demo/python/handwritten_text_recognition_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def main():
7777
log.info('OpenVINO Inference Engine')
7878
log.info('\tbuild: {}'.format(get_version()))
7979
core = Core()
80-
core.set_config(config={"GPU_ENABLE_LOOP_UNROLLING": "NO", "CACHE_DIR": "./"}, device_name="GPU")
80+
core.set_property("GPU", {"GPU_ENABLE_LOOP_UNROLLING": "NO", "CACHE_DIR": "./"})
8181

8282
# Read IR
8383
log.info('Reading model {}'.format(args.model))

0 commit comments

Comments
 (0)