Added possiblity to record and replay delta actions during teleoperation rather than absolute actions

Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
This commit is contained in:
Michel Aractingi
2025-02-12 19:25:41 +01:00
committed by AdilZouitine
parent 4057904238
commit 9c14830cd9
11 changed files with 63 additions and 618 deletions

View File

@@ -147,6 +147,8 @@ class Classifier(
def predict_reward(self, x, threshold=0.6):
if self.config.num_classes == 2:
return (self.forward(x).probabilities > threshold).float()
probs = self.forward(x).probabilities
logging.info(f"Predicted reward images: {probs}")
return (probs > threshold).float()
else:
return torch.argmax(self.forward(x).probabilities, dim=1)