From d21d5ceeeefd376906841ecfeee884ccfde92975 Mon Sep 17 00:00:00 2001 From: Bruce Wayne Date: Tue, 24 Sep 2024 12:11:23 -0700 Subject: [PATCH] View hack --- selfdrive/modeld/modeld.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/modeld/modeld.py b/selfdrive/modeld/modeld.py index b4636d1059c890..806ee3de545169 100755 --- a/selfdrive/modeld/modeld.py +++ b/selfdrive/modeld/modeld.py @@ -104,12 +104,12 @@ def run(self, buf: VisionBuf, wbuf: VisionBuf, transform: np.ndarray, transform_ new_img = self.frame.prepare(buf, transform.flatten(), self.model.getCLBuffer("input_imgs")) self.input_imgs[:MODEL_FRAME_SIZE] = self.input_imgs[-MODEL_FRAME_SIZE:] self.input_imgs[MODEL_FRAME_SIZE:] = new_img[:] - self.model.setInputBuffer("input_imgs", self.input_imgs) + self.model.setInputBuffer("input_imgs", self.input_imgs.view(np.float32)) if wbuf is not None: new_big_img = self.wide_frame.prepare(wbuf, transform_wide.flatten(), self.model.getCLBuffer("big_input_imgs")) self.big_input_imgs[:MODEL_FRAME_SIZE] = self.big_input_imgs[-MODEL_FRAME_SIZE:] self.big_input_imgs[MODEL_FRAME_SIZE:] = new_big_img[:] - self.model.setInputBuffer("big_input_imgs", self.big_input_imgs) + self.model.setInputBuffer("big_input_imgs", self.big_input_imgs.view(np.float32)) if prepare_only: