(self, x, t=False)
| 168 | return x.detach().cpu().numpy() |
| 169 | |
| 170 | def infer_lidar(self, x, t=False): |
| 171 | self.model.eval() |
| 172 | x = x.view(1, self.config.MODEL.S2CNN.INPUT_CHANNEL_NUM, x.shape[-2], x.shape[-1]) |
| 173 | if t == True: |
| 174 | t1 = time.time() |
| 175 | with torch.no_grad(): |
| 176 | x = self.model(x).view(-1) |
| 177 | if t == True: |
| 178 | t2 = time.time() |
| 179 | t_delta = t2-t1 |
| 180 | return x.detach().cpu().numpy(), t_delta |
| 181 | return x.detach().cpu().numpy() |