baselines
baselines copied to clipboard
TypeError: mlp() got an unexpected keyword argument 'value_network'
After installation of tf2 version, I tried to run the check command in readme I got the error above
python -m baselines.run --alg=ppo2 --env=Humanoid-v2 --network=mlp --num_timesteps=2e7 Logging to /tmp/openai-2019-10-30-11-49-36-171979 env_type: mujoco Training ppo2 on mujoco:Humanoid-v2 with arguments {'nsteps': 2048, 'nminibatches': 32, 'lam': 0.95, 'gamma': 0.99, 'noptepochs': 10, 'log_interval': 1, 'ent_coef': 0.0, 'lr': <function mujoco.
. at 0x7fdc5279a3b0>, 'cliprange': 0.2, 'value_network': 'copy', 'network': 'mlp'} Traceback (most recent call last): File "/home/jiyue/anaconda3/envs/baselinetf2/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/jiyue/anaconda3/envs/baselinetf2/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/jiyue/pytorchProjects/baselines-tf2/baselines/run.py", line 249, in main(sys.argv) File "/home/jiyue/pytorchProjects/baselines-tf2/baselines/run.py", line 209, in main model, env = train(args, extra_args) File "/home/jiyue/pytorchProjects/baselines-tf2/baselines/run.py", line 79, in train **alg_kwargs File "/home/jiyue/pytorchProjects/baselines-tf2/baselines/ppo2/ppo2.py", line 96, in learn policy_network_fn = get_network_builder(network_type)(**network_kwargs) TypeError: mlp() got an unexpected keyword argument 'value_network'
@tanzhenyu
Me too +1
I am facing the same error.
@christopherhesse Can you please tell why are we using the value_network
parameter in baselines/baselines/ppo2/defaults.py
also the README indicates it. Asking as i could get through the error by removing the parameter from the defaults.
I'm also facing this error. Still have no idea how to fix it.
Solved adding **mlp_kwargs in mlp() implementation. Not sure if it will lead to another problem later, but the code runs, apparently with no problems.