Closed kosmylo closed 4 years ago
Hello,
Quick question: did you try without tensorboard logging?
EDIT: please also fill the issue template completely
Hello,
Quick question: did you try without tensorboard logging?
EDIT: please also fill the issue template completely
Yes, I tried without tensorboard and I still get the same error. I also updated the information.
I could reproduce the error with:
from stable_baselines import SAC
from stable_baselines.common.cmd_util import make_vec_env
from stable_baselines.common.vec_env import VecNormalize, VecFrameStack
env = make_vec_env('Pendulum-v0', n_envs=1)
# The following does not work:
# env = VecNormalize(env)
# env = VecFrameStack(env, 4)
# But this works:
env = VecFrameStack(env, 4)
env = VecNormalize(env)
model = SAC('MlpPolicy', env, verbose=1)
model.learn(10000)
but it works if you wrap first with VecFrameStack
and then VecNormalize
.
Anyway, with SAC, you normally don't have to normalize and you don't need external action noise.
Yes, I confirm that if you wrap first with VecFrameStack, there is no error.
I am trying different RL agents in a custom environment to check their behavior. First I tried PPO2 together with VecFrameStack and everything worked out fine and I got a very reasonable policy. Then I wanted to try SAC, but I can run it only if I do not use VecFrameStack, because otherwise, I am getting an error.
The code used to initiate the training is the following:
The error that I am getting is related to tensor dimensions:
System Info
If I train it without VecFrameStack, it provides a reasonable policy. Could you maybe explain a bit what I should do to be able to train it together with VecFrameStack?