def _load_engine(self, trt_file):
        """
        Load tensorrt engine.
        :param trt_file:    tensorrt file.
        :return:
            ICudaEngine
        """
        with open(trt_file, "rb") as f, \
                trt.Runtime(TRT_LOGGER) as runtime:
            engine = runtime.deserialize_cuda_engine(f.read())
        return engine

        Load tensorrt engine.
        :param trt_file:    tensorrt file.
        :return:
            ICudaEngine
        
tools/deploy/trt_inference.py