Downloads · 30 days
1
2% of all-time downloads
LuckLin/a2c-PandaReachDense-v3
a2c-PandaReachDense-v3 is a reinforcement learning model from LuckLin. 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 an A2C agent playing PandaReachDense-v3 using the stable-baselines3 library and the panda-gym environment.
Downloads · 30 days
1
2% of all-time downloads
All-time downloads
53
Public
Repo size
475 KB
Likes
0
Public
Click a slice to open those files.
.mp4144 KB · 37%
From the Hugging Face model README
This is a trained model of an A2C agent playing PandaReachDense-v3 using the stable-baselines3 library and the panda-gym environment.
To use this model, you need to install the following dependencies:
pip install stable-baselines3 huggingface_sb3 panda_gym shimmy
Then you can load and evaluate the model:
```python
from huggingface_sb3 import load_from_hub
from stable_baselines3 import A2C
from stable_baselines3.common.vec_env import DummyVecEnv, VecNormalize
# Load the model and statistics
repo_id = "LuckLin/a2c-PandaReachDense-v3"
filename = "a2c-PandaReachDense-v3.zip"
checkpoint = load_from_hub(repo_id, filename)
model = A2C.load(checkpoint)
# Load the normalization statistics
stats_path = load_from_hub(repo_id, "vec_normalize.pkl")
env = DummyVecEnv([lambda: gym.make("PandaReachDense-v3")])
env = VecNormalize.load(stats_path, env)
# At test time, we don't update the stats
env.training = False
env.norm_reward = False
# Evaluate
obs = env.reset()
for _ in range(1000):
action, _states = model.predict(obs, deterministic=True)
obs, rewards, dones, info = env.step(action)
env.render()