class_docstr: A pixel-wise classifier.
  
  It computes the loss based on a given input/label pair for
  semantic segmentation.
  
  Args:
      predictor (~chainer.Link): Predictor network.
      ignore_label (int): A class id that is going to be ignored in
          evaluation. The default value is -1.
      class_weight (array): An array
          that contains constant weights that will be multiplied with the
          loss values along with the channel dimension. This will be
          used in :func:`chainer.functions.softmax_cross_entropy`.
class_docstr_tok: ["A","pixel-wise","classifier",".","It","computes","the","loss","based","on","a","given","input\/label","pair","for","semantic","segmentation",".","Args",":","predictor","(","~chainer.Link",")",":","Predictor","network",".","ignore_label","(","int",")",":","A","class","id","that","is","going","to","be","ignored","in","evaluation",".","The","default","value","is","-1.","class_weight","(","array",")",":","An","array","that","contains","constant","weights","that","will","be","multiplied","with","the","loss","values","along","with","the","channel","dimension",".","This","will","be","used","in",":","func",":","`","chainer.functions.softmax_cross_entropy","`","."]
docstr: Computes the loss value for an image and label pair.
  
  Args:
      x (~chainer.Variable): A variable with a batch of images.
      t (~chainer.Variable): A variable with the ground truth
          image-wise label.
  
  Returns:
      ~chainer.Variable: Loss value.
docstr_tok: ["Computes","the","loss","value","for","an","image","and","label","pair",".","Args",":","x","(","~chainer.Variable",")",":","A","variable","with","a","batch","of","images",".","t","(","~chainer.Variable",")",":","A","variable","with","the","ground","truth","image-wise","label",".","Returns",":","~chainer.Variable",":","Loss","value","."]
code: def forward(self, x, t):
      """Computes the loss value for an image and label pair.
  
      Args:
          x (~chainer.Variable): A variable with a batch of images.
          t (~chainer.Variable): A variable with the ground truth
              image-wise label.
  
      Returns:
          ~chainer.Variable: Loss value.
  
      """
      self.y = self.predictor(x)
      self.loss = F.softmax_cross_entropy(
          self.y,
          t,
          class_weight=self.class_weight,
          ignore_label=self.ignore_label,
      )
  
      reporter.report({"loss": self.loss}, self)
      return self.loss
  
file_path: chainercv/chainercv/links/model/pixelwise_softmax_classifier.py
imports: import chainer
  from chainer.backends import cuda
  import chainer.functions
  from chainer import reporter
  import numpy
label_desc: Use image node_id 4 for calling the PixelwiseSoftmaxClassifier obj's underlying member method code with example usage: obj.forward(x, t) and returns: self