class_docstr: Linear-chain conditional random field loss layer.
  
  This link wraps the :func:`~chainer.functions.crf1d` function.
  It holds a transition cost matrix as a parameter.
  
  Args:
      n_label (int): Number of labels.
      initial_cost (:ref:`initializer <initializer>`): Initializer to
          initialize the transition cost matrix.
          If this attribute is not specified,
          the transition cost matrix is initialized with zeros.
  
  .. seealso:: :func:`~chainer.functions.crf1d` for more detail.
  
  Attributes:
      cost (~chainer.Variable): Transition cost parameter.
docstr: Computes a state that maximizes a joint probability.
  
  Args:
      xs (list of Variable): Input vector for each label.
      transpose (bool): If ``True``, input/output sequences
      will be sorted in descending order of length.
  
  Returns:
      tuple: A tuple of :class:`~chainer.Variable` representing each
      log-likelihood and a list representing the argmax path.
  
  .. seealso:: See :func:`~chainer.frunctions.crf1d_argmax` for more
     detail.
code: def argmax(self, xs, transpose=False):
      """Computes a state that maximizes a joint probability.
  
      Args:
          xs (list of Variable): Input vector for each label.
          transpose (bool): If ``True``, input/output sequences
          will be sorted in descending order of length.
  
      Returns:
          tuple: A tuple of :class:`~chainer.Variable` representing each
          log-likelihood and a list representing the argmax path.
  
      .. seealso:: See :func:`~chainer.frunctions.crf1d_argmax` for more
         detail.
  
      """
  
      if transpose:
          indices = argsort_list_descent(xs)
          xs = permutate_list(xs, indices, inv=False)
          trans_x = transpose_sequence.transpose_sequence(xs)
          score, path = crf1d.argmax_crf1d(self.cost, trans_x)
  
          path = transpose_sequence.transpose_sequence(path)
          path = [p.array for p in path]
          path = permutate_list(path, indices, inv=True)
  
      else:
          score, path = crf1d.argmax_crf1d(self.cost, xs)
  
      return score, path
  
file_path: chainer/chainer/links/loss/crf1d.py
imports: from chainer.functions.array import transpose_sequence
  from chainer.functions.loss import crf1d
  from chainer import initializers
  from chainer import link
  from chainer.links.rnn.n_step_rnn import argsort_list_descent
  from chainer.links.rnn.n_step_rnn import permutate_list
  from chainer import variable
label_desc: Use image node_id 3 for calling the CRF1d obj's underlying member method code with example usage: obj.argmax(xs, transpose) and returns: score,  path