From ac55107773b7ab29c2c502a123794d2d103fe45c Mon Sep 17 00:00:00 2001 From: LielinJiang Date: Fri, 2 Feb 2024 14:02:06 +0800 Subject: [PATCH] fix bevfomer deploy --- deploy/bevformer/python/infer_evaluate.py | 2 +- paddle3d/models/detection/bevformer/bevformer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/bevformer/python/infer_evaluate.py b/deploy/bevformer/python/infer_evaluate.py index ae9df1b0..2c08248d 100644 --- a/deploy/bevformer/python/infer_evaluate.py +++ b/deploy/bevformer/python/infer_evaluate.py @@ -21,7 +21,7 @@ import paddle from paddle import inference -from paddle3d.ops import ms_deform_attn +from paddle3d.ops.ms_deform_attn import ms_deform_attn from paddle3d.apis.config import Config from paddle3d.apis.trainer import Trainer from paddle3d.slim import get_qat_config diff --git a/paddle3d/models/detection/bevformer/bevformer.py b/paddle3d/models/detection/bevformer/bevformer.py index 44182c4c..e4216488 100644 --- a/paddle3d/models/detection/bevformer/bevformer.py +++ b/paddle3d/models/detection/bevformer/bevformer.py @@ -354,7 +354,7 @@ def export(self, save_dir: str, **kwargs): input_spec = [image_spec, pre_bev_spec, img_metas_spec] paddle.jit.to_static(self, input_spec=input_spec) - if self.is_quant_model: + if self.is_quant_model(): self.qat.save_quantized_model( model=self, path=os.path.join(save_dir, "bevformer_inference"),