Views
No views yet
1from lerobot.policies.act.model import ACTPolicy
2from lerobot.configs.policies import PreTrainedConfig
3
4# 加载模型
5config = PreTrainedConfig(
6 repo_id="Junzhe1/AHM_IL2",
7 commit="main" # 或指定特定的checkpoint tag
8)
9policy = ACTPolicy.from_pretrained(config.repo_id)1{
2 "type": "act",
3 "n_obs_steps": 1,
4 "input_features": {
5 "observation.state": {
6 "type": "STATE",
7 "shape": [
8 7
9 ]
10 },
11 "observation.images.realsense_wrist": {
12 "type": "VISUAL",
13 "shape": [
14 3,
15 480,
16 640
17 ]
18 },
19 "observation.images.realsense_front": {
20 "type": "VISUAL",
21 "shape": [
22 3,
23 480,
24 640
25 ]
26 }
27 },
28 "output_features": {
29 "action": {
30 "type": "ACTION",
31 "shape": [
32 7
33 ]
34 }
35 },
36 "device": "cuda",
37 "use_amp": true,
38 "push_to_hub": false,
39 "repo_id": null,
40 "private": null,
41 "tags": null,
42 "license": null,
43 "pretrained_path": null,
44 "chunk_size": 100,
45 "n_action_steps": 100,
46 "normalization_mapping": {
47 "VISUAL": "MEAN_STD",
48 "STATE": "MEAN_STD",
49 "ACTION": "MEAN_STD"
50 },
51 "vision_backbone": "resnet18",
52 "pretrained_backbone_weights": "ResNet18_Weights.IMAGENET1K_V1",
53 "replace_final_stride_with_dilation": false,
54 "pre_norm": false,
55 "dim_model": 512,
56 "n_heads": 8,
57 "dim_feedforward": 3200,
58 "feedforward_activation": "relu",
59 "n_encoder_layers": 4,
60 "n_decoder_layers": 1,
61 "use_vae": true,
62 "latent_dim": 32,
63 "n_vae_encoder_layers": 4,
64 "temporal_ensemble_coeff": null,
65 "dropout": 0.1,
66 "kl_weight": 10.0,
67 "optimizer_lr": 1e-05,
68 "optimizer_weight_decay": 0.0001,
69 "optimizer_lr_backbone": 1e-05
70}1@misc{lerobot2024,
2 title={LeRobot: A Versatile Framework for Robot Learning},
3 author={LeRobot Team},
4 year={2024},
5 howpublished={\url{https://github.com/huggingface/lerobot}}
6}