def act(self, state, eps=0.0):
    'Returns actions for given state as per current policy.\n        \n        Params\n        ======\n            state (array_like): current state\n            eps (float): epsilon, for epsilon-greedy action selection\n        '
    state = torch.from_numpy(state).float().unsqueeze(0).to(device)
    self.qnetwork_local.eval()
    with torch.no_grad():
        action_values = self.qnetwork_local(state)
    self.qnetwork_local.train()
    if (random.random() > eps):
        return np.argmax(action_values.cpu().data.numpy())
    else:
        return random.choice(np.arange(self.action_size))
Returns actions for given state as per current policy.

Params
======
    state (array_like): current state
    eps (float): epsilon, for epsilon-greedy action selection
def act(self, state, eps=0.0):
    'Returns actions for given state as per current policy.\n        \n        Params\n        ======\n            state (array_like): current state\n            eps (float): epsilon, for epsilon-greedy action selection\n        '
    state = torch.from_numpy(state).float().unsqueeze(0).to(device)
    self.qnetwork_local.eval()
    with torch.no_grad():
        action_values = self.qnetwork_local(state)
    self.qnetwork_local.train()
    if (random.random() > eps):
        return np.argmax(action_values.cpu().data.numpy())
    else:
        return random.choice(np.arange(self.action_size))