def _infer_shape(self, x: List[int], w: List[int]):
        """infer the output shape for nms op"""
        eval_func = self.shape_eval_template.render(
            indent="",
            dtype="",
            div="//",
            nmsMaxOut=self._attrs["nmsMaxOut"],
            x_dim0=x[0],
            x_dim1=x[1],
            x_dim2=x[2],
            x_dim3=x[3],
        )
        output = {}
        exec(eval_func, output)  # noqa: P204  # noqa: P204
        return [int(output["NO"]), int(output["CO"]), int(output["HO"])]
infer the output shape for nms op
python/aitemplate/compiler/ops/vision_ops/nms/efficient_nms.py