Commit b76514d1 authored by lli's avatar lli
Browse files

change parameter value

parent 01dd6c69
......@@ -21,7 +21,7 @@ device = torch.device('cuda' if USE_CUDA else 'cpu')
class DQN(nn.Module):
def __init__(self, n_state, n_action, n_hidden, lr):
super(DQN, self).__init__()
self.criterion = torch.nn.MSELoss()
self.criterion = torch.nn.SmoothL1Loss()
self.model = torch.nn.Sequential(
torch.nn.Linear(n_state, n_hidden),
torch.nn.ReLU(),
......@@ -110,7 +110,7 @@ lr = 0.001
replay_buffer = deque(maxlen=10000)
replay_batch_size = 64
n_episode = 100
n_episode = 10000
gamma = 1
total_reward_episode = [0] * n_episode
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment