This project provides several RL algorithm to control multi-AGV to find collision-free paths in a robotic and mobile fulfiment system (such as Amazon Robot system)
49
stars
8
forks
source link
Error reported in the section of torch.load('DQN_structure/network_picture/RMFS_DQN_policy_net.pt') #1
跑的是DQN算法这是运行结果:
Model is controlled by use_NN mode
start simulation with DQN algorithm
map_xdim: 13 map_ydim: 12 state_number: 3
load NN
Traceback (most recent call last):
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\main.py", line 79, in
main()
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\main.py", line 61, in main
agent = modelController(multi_agv_scene, map_xdim=map_xdim, map_ydim=map_ydim, max_task=max_task,
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\algorithm\DQN_structure\Controller.py", line 34, in init
policy_net = torch.load('DQN_structure/network_picture/RMFS_DQN_policy_net.pt')
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 595, in load
with _open_file_like(f, 'rb') as opened_file:
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 231, in _open_file_like
return _open_file(name_or_buffer, mode)
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 212, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'DQN_structure/network_picture/RMFS_DQN_policy_net.pt'
我试着将相对路径改为绝对路径也是一样的报错
然后我尝试着在pycharm上打开RMFS_DQN_policy_net.pt,显示:the file was loaded in a wrong encoding: 'UTF-8',
但是我在打开RMFS_DQN_policy_net_auto.pt时则没有这样的提示
然后我尝试着运行其他强化学习算法,发现其他算法也有类似的问题,比如MADQN:
Traceback (most recent call last):
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\main.py", line 79, in
main()
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\main.py", line 61, in main
agent = modelController(multi_agv_scene, map_xdim=map_xdim, map_ydim=map_ydim, max_task=max_task,
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\algorithm\MADQN_structure\Controller.py", line 35, in init
self.create_agent(map_xdim, map_ydim)
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\algorithm\MADQN_structure\Controller.py", line 59, in create_agent
policy_net = torch.load(os.path.join(self.storage_path, "policy_net.pt"))
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 595, in load
with _open_file_like(f, 'rb') as opened_file:
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 231, in _open_file_like
return _open_file(name_or_buffer, mode)
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 212, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\algorithm\MADQN_structure\network_picture\policy_net.pt'
跑的是DQN算法这是运行结果: Model is controlled by use_NN mode start simulation with DQN algorithm map_xdim: 13 map_ydim: 12 state_number: 3
load NN Traceback (most recent call last): File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\main.py", line 79, in
main()
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\main.py", line 61, in main
agent = modelController(multi_agv_scene, map_xdim=map_xdim, map_ydim=map_ydim, max_task=max_task,
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\algorithm\DQN_structure\Controller.py", line 34, in init
policy_net = torch.load('DQN_structure/network_picture/RMFS_DQN_policy_net.pt')
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 595, in load
with _open_file_like(f, 'rb') as opened_file:
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 231, in _open_file_like
return _open_file(name_or_buffer, mode)
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 212, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'DQN_structure/network_picture/RMFS_DQN_policy_net.pt'
我试着将相对路径改为绝对路径也是一样的报错 然后我尝试着在pycharm上打开RMFS_DQN_policy_net.pt,显示:the file was loaded in a wrong encoding: 'UTF-8', 但是我在打开RMFS_DQN_policy_net_auto.pt时则没有这样的提示
然后我尝试着运行其他强化学习算法,发现其他算法也有类似的问题,比如MADQN: Traceback (most recent call last): File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\main.py", line 79, in
main()
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\main.py", line 61, in main
agent = modelController(multi_agv_scene, map_xdim=map_xdim, map_ydim=map_ydim, max_task=max_task,
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\algorithm\MADQN_structure\Controller.py", line 35, in init
self.create_agent(map_xdim, map_ydim)
File "E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\algorithm\MADQN_structure\Controller.py", line 59, in create_agent
policy_net = torch.load(os.path.join(self.storage_path, "policy_net.pt"))
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 595, in load
with _open_file_like(f, 'rb') as opened_file:
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 231, in _open_file_like
return _open_file(name_or_buffer, mode)
File "E:\conda\Anaconda3\envs\pytorch\lib\site-packages\torch\serialization.py", line 212, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'E:\Reinforcement-learning-for-multi-AGV-pathfinding-main\src\algorithm\MADQN_structure\network_picture\policy_net.pt'