Skip to content

Commit

Permalink
Fix the performance test for RKNN (#1583)
Browse files Browse the repository at this point in the history
  • Loading branch information
AllentDan authored Jan 11, 2023
1 parent 6b9bfcf commit 11e8a21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mmdeploy/apis/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def inference_model(model_cfg: Union[str, mmengine.Config],
from mmdeploy.apis.utils import build_task_processor
task_processor = build_task_processor(model_cfg, deploy_cfg, device)

model = task_processor.build_backend_model(backend_files)
model = task_processor.build_backend_model(
backend_files, task_processor.update_data_preprocessor)

input_shape = get_input_shape(deploy_cfg)
model_inputs, _ = task_processor.create_input(img, input_shape)
Expand Down
3 changes: 2 additions & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def main():
dataloader = task_processor.build_dataloader(test_dataloader)

# load the model of the backend
model = task_processor.build_backend_model(args.model)
model = task_processor.build_backend_model(
args.model, task_processor.update_data_preprocessor)
destroy_model = model.destroy
is_device_cpu = (args.device == 'cpu')

Expand Down

0 comments on commit 11e8a21

Please sign in to comment.