def learn(self, experiences, gamma):
    "Update value parameters using given batch of experience tuples.\n\n        Params\n        ======\n            experiences (Tuple[torch.Tensor]): tuple of (s, a, r, s', done) tuples \n            gamma (float): discount factor\n        "
    (states, actions, rewards, next_states, dones) = experiences
    '*** YOUR CODE HERE ***'
    Q_targets_next = self.qnetwork_local(next_states).detach().max(1)[0].unsqueeze(1)
    Q_targets = (rewards + ((gamma * Q_targets_next) * (1 - dones)))
    Q_expected = self.qnetwork_local(states).gather(1, actions)
    loss = F.mse_loss(Q_expected, Q_targets)
    self.optimizer.zero_grad()
    loss.backward()
    self.optimizer.step()
    self.soft_update(self.qnetwork_local, self.qnetwork_target, TAU)
Update value parameters using given batch of experience tuples.

Params
======
    experiences (Tuple[torch.Tensor]): tuple of (s, a, r, s', done) tuples 
    gamma (float): discount factor
def learn(self, experiences, gamma):
    "Update value parameters using given batch of experience tuples.\n\n        Params\n        ======\n            experiences (Tuple[torch.Tensor]): tuple of (s, a, r, s', done) tuples \n            gamma (float): discount factor\n        "
    (states, actions, rewards, next_states, dones) = experiences
    '*** YOUR CODE HERE ***'
    Q_targets_next = self.qnetwork_local(next_states).detach().max(1)[0].unsqueeze(1)
    Q_targets = (rewards + ((gamma * Q_targets_next) * (1 - dones)))
    Q_expected = self.qnetwork_local(states).gather(1, actions)
    loss = F.mse_loss(Q_expected, Q_targets)
    self.optimizer.zero_grad()
    loss.backward()
    self.optimizer.step()
    self.soft_update(self.qnetwork_local, self.qnetwork_target, TAU)