错误一:TypeError: must be str, not NoneType . run train.py
rew_file_name = arglist.plots_dir + arglist.exp_name + '_rewards.pkl' ————train.py
解决:
更改train.py第27行,添加默认文件名:
parser.add_argument("--exp-name", type=str, default="exp1", help="name of the experiment")
或输入命令行时进行自定义:
--env_name = exp1
错误二:[Errno 2] No such file or directory: ‘./learning_curves/exp1_rewards.pkl’
with open(rew_file_name, 'wb') as fp: —— ——train.py
解决:
需要人为在experienments下面建子目录learning_curves
错误三:除simple环境以外其他环境跑不通
https://blog.csdn.net/cuilllinn/article/details/117229413
解决:
更换环境后,要先把./tmp/policy清空再跑程序
并且训练时要把train.py中display设为FALSE,待训练完毕再设为True展示效果