mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 10:16:09 +00:00
fix nit formatting in generate actions fcn
This commit is contained in:
@@ -112,9 +112,10 @@ class MultiTaskDiTPolicy(PreTrainedPolicy):
|
|||||||
conditioning_vec = self.observation_encoder.encode(batch)
|
conditioning_vec = self.observation_encoder.encode(batch)
|
||||||
actions = self.objective.conditional_sample(self.noise_predictor, batch_size, conditioning_vec)
|
actions = self.objective.conditional_sample(self.noise_predictor, batch_size, conditioning_vec)
|
||||||
|
|
||||||
start_idx = n_obs_steps - 1
|
start = n_obs_steps - 1
|
||||||
end_idx = start_idx + self.config.n_action_steps
|
end = start + self.config.n_action_steps
|
||||||
return actions[:, start_idx:end_idx]
|
actions = actions[:, start:end]
|
||||||
|
return actions
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
"""Clear observation and action queues. Should be called on `env.reset()`"""
|
"""Clear observation and action queues. Should be called on `env.reset()`"""
|
||||||
|
|||||||
Reference in New Issue
Block a user