from stable_baselines3 import A2C
model=A2C('MlpPolicy',env,verbose=1)
model.learn(total_timesteps=10000)
I am using this on CartPole-v1
env=gym.make('CartPole-v1')
And I am getting
RuntimeError: Could not infer dtype of numpy.float32
from stable_baselines3 import A2C
model=A2C('MlpPolicy',env,verbose=1)
model.learn(total_timesteps=10000)
I am using this on CartPole-v1
env=gym.make('CartPole-v1')
And I am getting
RuntimeError: Could not infer dtype of numpy.float32
it is problem with combability, so for start my recommendations update your pytorch I solved this problem for python3.10 with the next version of pytorch
pip install torch===1.11.0 torchvision===0.1.6 -f https://download.pytorch.org/whl/torch_stable.html