RuntimeError                              Traceback (most recent call last)
 in ()
----> 1 scores = dqn()
2
3 # plot the scores
4 fig = plt.figure()
5 ax = fig.add_subplot(111)
 in dqn(n_episodes, max_t, eps_start, eps_end, eps_decay)
23             score += reward
24             #reward = np.tanh(reward)
—> 25             agent.step(state, action, reward, next_state, done)
26             state = next_state
27             if done:
 in step(self, state, action, reward, next_state, done)
57             if np.count_nonzero(self.memory.tree.tree) > self.batch_size:
58                 tree_idx, batch, ISWeights_mb = self.memory.sample(BATCH_SIZE)
—> 59                 self.learn(batch, GAMMA)
60
61     def act(self, state, eps=0.):
 in learn(self, batch, gamma)
120         Q_expected = self.qnetwork_local(states).gather(1, actions.unsqueeze(1))
121
–> 122         loss = F.mse_loss(Q_expected, Q_targets)
123         self.optimizer.zero_grad()
124         loss.backward()
/usr/local/lib/python3.5/dist-packages/torch/nn/functional.py in mse_loss(input, target, size_average, reduce)
1567     “”"
1568     return _pointwise_loss(lambda a, b: (a - b) ** 2, torch._C._nn.mse_loss,
-> 1569                            input, target, size_average, reduce)
1570
1571
/usr/local/lib/python3.5/dist-packages/torch/nn/functional.py in _pointwise_loss(lambd, lambd_optimized, input, target, size_average, reduce)
1535         return torch.mean(d) if size_average else torch.sum(d)
1536     else:
-> 1537         return lambd_optimized(input, target, size_average, reduce)
1538
1539
RuntimeError: input and target shapes do not match: input [32 x 1], target [32 x 32] at /pytorch/aten/src/THCUNN/generic/MSECriterion.cu:15