Views
No views yet
| Parameter | Value |
|---|---|
| n_rollout | 2048 |
| n_epochs | 4 |
| batch_size | 256 |
| lr | 0.0003 |
| gamma | 0.99 |
| gae_lambda | 0.95 |
| clip_eps | 0.2 |
| entropy_coef | 0.01 |
1import torch
2from ppo_policy import PPOPolicy
3
4policy = PPOPolicy()
5ckpt = torch.load("policy_update_XXXXX.pt", map_location="cpu")
6policy.load_state_dict(ckpt["policy_state"])
7policy.eval()
8
9# obs: dict with keys depth (64,64), command (4,), proprioception (3,)
10action, log_prob, entropy, value = policy.get_action_and_value(
11 depth.unsqueeze(0),
12 command.unsqueeze(0),
13 prop.unsqueeze(0),
14)