MCPcopy Create free account
hub / github.com/MetaSLAM/SphereVLAD / infer_lidar

Method infer_lidar

models/robotLCD.py:170–181  ·  view source on GitHub ↗
(self, x, t=False)

Source from the content-addressed store, hash-verified

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()

Callers 1

infer_frameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected