Thank you for advice.
I’m not very good at English, so I apologize if I misinterpreted your sentence.
num_states is set to 8.batch_size is set to 128.
print(state_batch.size())

torch.Size([1024])

“input” is model’s declaration?
InputNumber is set to 8, AttackNumber is set to 6.

Policy_Net = OriNet.DQN(InputNumber,AttackNumber).to(device)
Target_Net = OriNet.DQN(InputNumber,AttackNumber).to(device)
Target_Net.load_state_dict(Policy_Net.state_dict())
Target_Net.eval()
optimizer = optim.Adam(Policy_Net.parameters(), lr=0.001)
memory = OriNet.ReplayMemory(10000)