original_docstring: 
      Given batch of logits, return one-hot sample using epsilon greedy strategy
      (based on given epsilon)
      
docstring: Given batch of logits, return one-hot sample using epsilon greedy strategy
  (based on given epsilon)
docstring_tokens: Given batch of logits return one - hot sample using epsilon greedy strategy ( based on given epsilon )
code: def onehot_from_logits(logits, eps=0.0):
      """
      Given batch of logits, return one-hot sample using epsilon greedy strategy
      (based on given epsilon)
      """
      # get best (according to current policy) actions in one-hot form
      argmax_acs = (logits == logits.max(1, keepdim=True)[0]).float()
      if eps == 0.0:
          return argmax_acs
      # get random actions in one-hot form
      rand_acs = Variable(torch.eye(logits.shape[1])[[np.random.choice(
          range(logits.shape[1]), size=logits.shape[0])]], requires_grad=False)
      # chooses between best and random actions using epsilon greedy
      return torch.stack([argmax_acs[i] if r > eps else rand_acs[i] for i, r in
                          enumerate(torch.rand(logits.shape[0]))])
code_tokens: def onehot_from_logits ( logits , eps = 0.0 ) : argmax_acs = ( logits == logits . max ( 1 , keepdim = True ) [ 0 ] ) . float ( ) if eps == 0.0 : return argmax_acs rand_acs = Variable ( torch . eye ( logits . shape [ 1 ] ) [ [ np . random . choice ( range ( logits . shape [ 1 ] ) , size = logits . shape [ 0 ] ) ] ] , requires_grad = False ) return torch . stack ( [ argmax_acs [ i ] if r > eps else rand_acs [ i ] for i , r in enumerate ( torch . rand ( logits . shape [ 0 ] ) ) ] )
short_docstring: Given batch of logits, return one-hot sample using epsilon greedy strategy
  (based on given epsilon)
short_docstring_tokens: Given batch of logits return one - hot sample using epsilon greedy strategy ( based on given epsilon )
comment: """
      Given batch of logits, return one-hot sample using epsilon greedy strategy
      (based on given epsilon)
      """$SEP$# get best (according to current policy) actions in one-hot form$SEP$# get random actions in one-hot form$SEP$# chooses between best and random actions using epsilon greedy