mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-24 17:10:35 +08:00
Improve Ascend
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user