BIT-MCS / DRL-EC3

[JSAC 2018] Energy-Efficient UAV Control for Effective and Fair Communication Coverage: A Deep Reinforcement Learning Approach
MIT License
81 stars 19 forks source link

code #1

Open Teacherxuyl opened 1 year ago

Teacherxuyl commented 1 year ago

Traceback (most recent call last): File "E:\github代码\DRL-EC3-main\experiments\train.py", line 319, in train(arglist, log) File "E:\github代码\DRL-EC3-main\experiments\train.py", line 117, in train summary = Summary(sess, envs[0].log_dir) IndexError: list index out of range What causes this problem when I run experiments/train.py? How can I solve this problem?Have a nice day.

hkskn24 commented 6 months ago

The value of arglist.num_actorworkers is set to 0 (experiments/train.py line 43), so the length of envs is 0 ("envs = [Env(log) for in range(arglist.num_actor_workers)]", experiments/train.py line 112) , and access " envs[0] " can cause this error. Maybe change the value of num_actor_workers can solve this problem.