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

Method eval_lcd

models/robotLCD.py:97–109  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

95 return loss_lidar.item()
96
97 def eval_lcd(self, x):
98 self.model.eval()
99 data = torch.cat(x, dim=1)
100 B = data.shape[0]
101 N = data.shape[1]
102 lidar_data = data.view(B*N, -1, data.shape[3], data.shape[4])
103 feature_lidar = self.model(lidar_data).view(B, N, -1)
104 with torch.no_grad():
105 loss, (trip, secd) = self.criterion(feature_lidar)
106 if self.neptune is not None:
107 self.neptune['Sphere/eval_lidar_loss'].append(loss.item())
108 self.neptune['Sphere/eval_lidar_trip'].append(trip.item())
109 self.neptune['Sphere/eval_lidar_secd'].append(secd.item())
110
111 def adjust_learning_rate(self):
112 if self.scheduler != None:

Callers 1

trainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected