Improve Ascend

This commit is contained in:
yunyaoXYY
2022-12-20 10:58:59 +00:00
parent 7212c14113
commit 8a860734ae
12 changed files with 69 additions and 84 deletions

View File

@@ -508,6 +508,17 @@ class RecognizerPreprocessor:
"""
return self._preprocessor.run(input_ims)
@property
def static_shape(self):
return self._preprocessor.static_shape
@static_shape.setter
def static_shape(self, value):
assert isinstance(
value,
bool), "The value to set `static_shape` must be type of bool."
self._preprocessor.static_shape = value
@property
def is_scale(self):
return self._preprocessor.is_scale
@@ -626,6 +637,17 @@ class Recognizer(FastDeployModel):
def postprocessor(self, value):
self._model.postprocessor = value
@property
def static_shape(self):
return self._model.preprocessor.static_shape
@static_shape.setter
def static_shape(self, value):
assert isinstance(
value,
bool), "The value to set `static_shape` must be type of bool."
self._model.preprocessor.static_shape = value
@property
def is_scale(self):
return self._model.preprocessor.is_scale