SeeYouStellar / NLDDPG_DQN

A repo about "Deep_reinforcement _learning_based_offloading_decision_algorithm_for_vehicular_edge_computing"
3 stars 1 forks source link

Warning when running the train.py program #1

Open SuperLuckyStar666 opened 7 months ago

SuperLuckyStar666 commented 7 months ago

Hi author, when I run the train.py program with pycharm software, the program gives me an error message, I'm a beginner now, how should I solve this problem? The error message is as follows:

NLDDPG_DQN-master\replaymemory.py:40: 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:248.) return torch.tensor(state, dtype=torch.float), torch.tensor(action, dtype=torch.float), torch.tensor(reward, dtype=torch.float), torch.tensor(done, dtype=torch.int), torch.tensor(next_state, dtype=torch.float)。

NLDDPG_DQN-master\agent.py:36: UserWarning: Using a target size (torch.Size([64, 64])) that is different to the input size (torch.Size([64, 1])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size. critic_loss = F.mse_loss(current_Q, target_Q)

ZQ-C commented 2 months ago

at the same