Publishing 2019 R1 content
[platform/upstream/dldt.git] / tools / calibration / calibrator_configuration.py
1 """
2 Copyright (C) 2018-2019 Intel Corporation
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 """
16
17 import collections
18
19
20 class CalibratorConfiguration:
21     def __init__(self, configuration):
22         self._config = configuration.config
23         self._model = configuration.model
24         self._weights = configuration.weights
25         self._device = configuration.device
26         self._cpu_extension = configuration.cpu_extension
27         self._gpu_extension = configuration.gpu_extension
28         self._threshold = configuration.threshold
29         self._batch_size = configuration.batch_size
30         self._progress = configuration.progress
31
32     @property
33     def config(self) -> str:
34         return self._config
35
36     @property
37     def model(self) -> str:
38         return self._model
39
40     @property
41     def weights(self) -> str:
42         return self._weights
43
44     @property
45     def device(self) -> str:
46         return self._device
47
48     @property
49     def cpu_extension(self) -> str:
50         return self._cpu_extension
51
52     @property
53     def gpu_extension(self) -> str:
54         return self._gpu_extension
55
56     @property
57     def threshold(self) -> str:
58         return self._threshold
59
60     @property
61     def batch_size(self) -> int:
62         return self._batch_size
63
64     @property
65     def progress(self) -> str:
66         return self._progress