AM-ACT#
← 教程资料库 · 策略与模型
本节介绍 LeRobot 的通用功能。请按目标机器人、数据集和运行环境配置示例;用于 AlohaMini 2 / 2 Pro 前,需要确认硬件与接口兼容性。
AM-ACT extends ACT with optional per-dimension classification heads while keeping all other action dimensions as continuous L1 regression outputs. It also supports fixed action dimensions, optional loss groups, visual-only inputs, selecting a subset of observation.state, and post-unnormalization action scaling.
Minimal training command#
conda activate lerobot_alohamini
python -m lerobot.scripts.lerobot_train \
--dataset.repo_id=local/my_dataset \
--dataset.root=/path/to/my_dataset \
--policy.type=am_act \
--policy.device=cuda \
--policy.fixed_action_dims='[]' \
--policy.discrete_action_dims='[14,15,16]' \
--policy.discrete_action_values='[[-0.15,0,0.15],[-0.15,0,0.15],[-45,0,45]]' \
--policy.discrete_action_class_weights='[[3,1,1.5],[3,1,2],[2,1,2]]' \
--policy.discrete_action_loss_weight=1.0 \
--output_dir=outputs/am_act_run \
--steps=100000 \
--batch_size=2
The values above are only an example. Dimension indices, physical class values, and class weights must match the dataset.
Main parameters#
Parameter |
Meaning |
|---|---|
|
Action dimensions excluded from training and forced to zero in normalized space. |
|
Action dimensions trained with classification instead of L1 regression. Empty by default. |
|
Physical class values for each discrete dimension. Their order defines the class order. |
|
Optional cross-entropy weights in the same order as |
|
Multiplier applied to the mean classification loss. |
|
Optional named groups used to calculate separately normalized continuous L1 losses. |
|
Optional weights for the named continuous loss groups. |
|
Optional subset of |
|
Physical action dimensions scaled after unnormalization during inference. |
|
Scale applied to |
discrete_action_values are specified in physical dataset units. AM-ACT converts them to normalized class centers using the active dataset statistics and decodes predicted classes before the standard action unnormalizer.
Load a trained checkpoint#
Use the saved policy like any other LeRobot policy:
conda activate lerobot_alohamini
python -m lerobot.scripts.lerobot_eval \
--policy.path=outputs/am_act_run/checkpoints/last/pretrained_model \
--env.type=<environment_type>
For robot-specific evaluation scripts, pass the same checkpoint path through their --policy.path option.