code: def learn(self, grad_arr):
          '''
          Update this Discriminator by ascending its stochastic gradient.
  
          Args:
              grad_arr:   `np.ndarray` of gradients.
  
          Returns:
              `np.ndarray` of delta or gradients.
  
          '''
          if grad_arr.ndim > 3:
              grad_arr = grad_arr.reshape((
                  grad_arr.shape[0],
                  grad_arr.shape[1],
                  -1
              ))
              grad_arr = grad_arr[:, -1]
          elif grad_arr.ndim == 3:
              grad_arr = grad_arr[:, -1]
  
          delta_arr, _, grads_list = self.__lstm_model.hidden_back_propagate(grad_arr)
          grads_list.insert(0, None)
          grads_list.insert(0, None)
  
          self.__lstm_model.optimize(
              grads_list,
              self.__learning_rate,
              1
          )
  
          return delta_arf learn(self, grad_arr):
          '''
          Update this Discriminator by ascending its stochastic gradient.
  
          Args:
              grad_arr:   `np.ndarray` of gradients.
  
          Returns:
              `np.ndarray` of delta or gradients.
  
          '''
          if grad_arr.ndim > 3:
              grad_arr = grad_arr.reshape((
                  grad_arr.shape[0],
                  grad_arr.shape[1],
                  -1
              ))
              grad_arr = grad_arr[:, -1]
          elif grad_arr.ndim == 3:
              grad_arr = grad_arr[:, -1]
  
          delta_arr, _, grads_list = self.__lstm_model.hidden_back_propagate(grad_arr)
          grads_list.insert(0, None)
          grads_list.insert(0, None)
  
          self.__lstm_model.optimize(
              grads_list,
              self.__learning_rate,
              1
          )
  
          return delta_arr
docs: Update this Discriminator by ascending its stochastic gradient.
  
          Args:
              grad_arr:   `np.ndarray` of gradients.
  
          Returns:
              `np.ndarray` of delta or gradients.