original_docstring: 
      Softmax loss function, vectorized version.
  
      Inputs and outputs are the same as softmax_loss_naive.
      
docstring: Softmax loss function, vectorized version.
  Inputs and outputs are the same as softmax_loss_naive.
docstring_tokens: Softmax loss function vectorized version . Inputs and outputs are the same as softmax_loss_naive .
code: def softmax_loss_vectorized(W, X, y, reg):
      """
      Softmax loss function, vectorized version.
  
      Inputs and outputs are the same as softmax_loss_naive.
      """
      # Initialize the loss and gradient to zero.
      loss = 0.0
      dW = np.zeros_like(W)
  
      #############################################################################
      # TODO: Compute the softmax loss and its gradient using no explicit loops.  #
      # Store the loss in loss and the gradient in dW. If you are not careful     #
      # here, it is easy to run into numeric instability. Don't forget the        #
      # regularization!                                                           #
      #############################################################################
      num_train = X.shape[0]
      scores = np.dot(X, W)
      exp_scores = np.exp(scores)
      softmax = exp_scores[np.arange(num_train), y] / np.sum(exp_scores, axis=1)
      Li = -np.log(softmax)
      loss = np.sum(Li) / num_train + reg * np.sum(W * W)
  
      D_scores = exp_scores / np.sum(exp_scores, axis=1).reshape(-1, 1)
      D_scores[np.arange(num_train), y] -= 1
      dW = np.dot(X.T, D_scores)
      dW /= num_train
      dW += 2 * reg * W
      #############################################################################
      #                          END OF YOUR CODE                                 #
      #############################################################################
  
      return loss, dW
code_tokens: def softmax_loss_vectorized ( W , X , y , reg ) : loss = 0.0 dW = np . zeros_like ( W ) num_train = X . shape [ 0 ] scores = np . dot ( X , W ) exp_scores = np . exp ( scores ) softmax = exp_scores [ np . arange ( num_train ) , y ] / np . sum ( exp_scores , axis = 1 ) Li = - np . log ( softmax ) loss = np . sum ( Li ) / num_train + reg * np . sum ( W * W ) D_scores = exp_scores / np . sum ( exp_scores , axis = 1 ) . reshape ( - 1 , 1 ) D_scores [ np . arange ( num_train ) , y ] -= 1 dW = np . dot ( X . T , D_scores ) dW /= num_train dW += 2 * reg * W return loss , dW
short_docstring: Softmax loss function, vectorized version.
short_docstring_tokens: Softmax loss function vectorized version .
comment: """
      Softmax loss function, vectorized version.
  
      Inputs and outputs are the same as softmax_loss_naive.
      """$SEP$# Initialize the loss and gradient to zero.$SEP$#############################################################################$SEP$# TODO: Compute the softmax loss and its gradient using no explicit loops.  #$SEP$# Store the loss in loss and the gradient in dW. If you are not careful     #$SEP$# here, it is easy to run into numeric instability. Don't forget the        #$SEP$# regularization!                                                           #$SEP$#############################################################################$SEP$#############################################################################$SEP$#                          END OF YOUR CODE                                 #$SEP$#############################################################################