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

Method infer_image

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

Source from the content-addressed store, hash-verified

155 return self.infer_image(*x, t)
156
157 def infer_image(self, x, t=False):
158 self.model.eval()
159 x = x.view(1, 3, x.shape[-2], x.shape[-1])
160 if t == True:
161 t1 = time.time()
162 with torch.no_grad():
163 x = self.model(x).view(-1)
164 if t == True:
165 t2 = time.time()
166 t_delta = t2-t1
167 return x.detach().cpu().numpy(), t_delta
168 return x.detach().cpu().numpy()
169
170 def infer_lidar(self, x, t=False):
171 self.model.eval()

Callers 1

infer_frameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected