Downloads · 30 days
31
100% of all-time downloads
chrisluo5311/a2c-PandaReachDense-v3
a2c-PandaReachDense-v3 is a reinforcement learning model from chrisluo5311. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for stable-baselines3.
This is a trained model of a A2C agent playing PandaReachDense-v3 using the stable-baselines3 library.
Downloads · 30 days
31
100% of all-time downloads
All-time downloads
31
Public
Repo size
823 KB
Likes
0
Public
Click a slice to open those files.
.mp4609 KB · 71%
From the Hugging Face model README
This is a trained model of a A2C agent playing PandaReachDense-v3 using the stable-baselines3 library.
Dict with three entries, which is why MultiInputPolicy is used instead of MlpPolicy:
observation: end-effector position (x, y, z) and velocity (vx, vy, vz)achieved_goal: current end-effector position (x, y, z)desired_goal: target position (x, y, z)| Metric | Value |
|---|---|
| Mean reward | -0.21 |
| Std reward | 0.08 |
Evaluated for 10 episodes with a deterministic policy, using the saved VecNormalize statistics (frozen, with reward normalization disabled).
import gymnasium as gym
import panda_gym
from huggingface_sb3 import load_from_hub
from stable_baselines3 import A2C
from stable_baselines3.common.vec_env import DummyVecEnv, VecNormalize
repo_id = "chrisluo5311/a2c-PandaReachDense-v3"
model_path = load_from_hub(repo_id, "a2c-PandaReachDense-v3.zip")
stats_path = load_from_hub(repo_id, "vec_normalize.pkl")
env = DummyVecEnv([lambda: gym.make("PandaReachDense-v3", render_mode="rgb_array")])
env = VecNormalize.load(stats_path, env)
env.training = False # do not update normalization stats at test time
env.norm_reward = False
model = A2C.load(model_path, env=env)
obs = env.reset()
for _ in range(1000):
action, _ = model.predict(obs, deterministic=True)
obs, rewards, dones, infos = env.step(action)
| Parameter | Value |
|---|---|
| Policy | MultiInputPolicy |
| Total timesteps | 1,000,000 |
| Parallel environments | 4 (DummyVecEnv) |
VecNormalize | norm_obs=True, norm_reward=True, clip_obs=10.0 |
| Others | Stable-Baselines3 A2C defaults (learning_rate=7e-4, n_steps=5, gamma=0.99, gae_lambda=1.0, ent_coef=0.0, vf_coef=0.5, max_grad_norm=0.5, RMSprop optimizer) |