From 40ed37417f9395d40b3f75b6a02c11e95140fa0d Mon Sep 17 00:00:00 2001 From: Alexander Soare Date: Fri, 17 May 2024 10:22:23 +0100 Subject: [PATCH] explain why n_encoder_layers=1 --- lerobot/common/policies/act/configuration_act.py | 3 +++ lerobot/configs/policy/act.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lerobot/common/policies/act/configuration_act.py b/lerobot/common/policies/act/configuration_act.py index be444b06..22bc2be0 100644 --- a/lerobot/common/policies/act/configuration_act.py +++ b/lerobot/common/policies/act/configuration_act.py @@ -115,6 +115,9 @@ class ACTConfig: dim_feedforward: int = 3200 feedforward_activation: str = "relu" n_encoder_layers: int = 4 + # Note: Although the original ACT implementation has 7 for `n_decoder_layers`, there is a bug in the code + # that means only the first layer is used. Here we match the original implementation by setting this to 1. + # See this issue https://github.com/tonyzhaozh/act/issues/25#issue-2258740521. n_decoder_layers: int = 1 # VAE. use_vae: bool = True diff --git a/lerobot/configs/policy/act.yaml b/lerobot/configs/policy/act.yaml index 15efcce8..55f1b3a8 100644 --- a/lerobot/configs/policy/act.yaml +++ b/lerobot/configs/policy/act.yaml @@ -66,6 +66,9 @@ policy: dim_feedforward: 3200 feedforward_activation: relu n_encoder_layers: 4 + # Note: Although the original ACT implementation has 7 for `n_decoder_layers`, there is a bug in the code + # that means only the first layer is used. Here we match the original implementation by setting this to 1. + # See this issue https://github.com/tonyzhaozh/act/issues/25#issue-2258740521. n_decoder_layers: 1 # VAE. use_vae: true