此处运行不通过,报错:
f:\Github\DDPG\DDPG.py:51: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at C:\cb\pytorch_1000000000000\work\torch\csrc\utils\tensor_new.cpp:233.)
state = T.tensor(observation, dtype=T.float).to(device)
Traceback (most recent call last):
File "f:\Github\DDPG\train.py", line 53, in
main()
File "f:\Github\DDPG\train.py", line 31, in main
action = agent.choose_action(observation, train=True)
File "f:\Github\DDPG\DDPG.py", line 51, in choose_action
state = T.tensor(observation, dtype=T.float).to(device)
ValueError: expected sequence of length 8 at dim 1 (got 0)
此处运行不通过,报错: f:\Github\DDPG\DDPG.py:51: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at C:\cb\pytorch_1000000000000\work\torch\csrc\utils\tensor_new.cpp:233.) state = T.tensor(observation, dtype=T.float).to(device) Traceback (most recent call last): File "f:\Github\DDPG\train.py", line 53, in
main()
File "f:\Github\DDPG\train.py", line 31, in main
action = agent.choose_action(observation, train=True)
File "f:\Github\DDPG\DDPG.py", line 51, in choose_action
state = T.tensor(observation, dtype=T.float).to(device)
ValueError: expected sequence of length 8 at dim 1 (got 0)