From 7eccefe23534c92c5263e96f48e87d77d62b4005 Mon Sep 17 00:00:00 2001 From: Adil Zouitine Date: Mon, 7 Jul 2025 17:40:39 +0200 Subject: [PATCH] refactor(learner): Remove normalization from cached image features retrieval - Simplified the retrieval of observation features by removing the normalization step from the `get_cached_image_features` method calls. - This change enhances clarity and aligns with the recent updates to policy processors. --- src/lerobot/scripts/rl/learner.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lerobot/scripts/rl/learner.py b/src/lerobot/scripts/rl/learner.py index f9f3901ce..17479b0f8 100644 --- a/src/lerobot/scripts/rl/learner.py +++ b/src/lerobot/scripts/rl/learner.py @@ -1048,10 +1048,8 @@ def get_observation_features( return None, None with torch.no_grad(): - observation_features = policy.actor.encoder.get_cached_image_features(observations, normalize=True) - next_observation_features = policy.actor.encoder.get_cached_image_features( - next_observations, normalize=True - ) + observation_features = policy.actor.encoder.get_cached_image_features(observations) + next_observation_features = policy.actor.encoder.get_cached_image_features(next_observations) return observation_features, next_observation_features