class_docstr: Carlini-Wagner Loss: objective function #6.
  Paper: https://arxiv.org/pdf/1608.04644.pdf
class_docstr_tok: ["Carlini-Wagner","Loss",":","objective","function","#","6",".","Paper",":","https",":","\/\/arxiv.org\/pdf\/1608.04644.pdf"]
docstr: :param input: pre-softmax/logits.
  :param target: true labels.
  :return: CW loss value.
docstr_tok: [":","param","input",":","pre-softmax\/logits",".",":","param","target",":","true","labels",".",":","return",":","CW","loss","value","."]
code: def forward(self, input, target):
      """
      :param input: pre-softmax/logits.
      :param target: true labels.
      :return: CW loss value.
      """
      num_classes = input.size(1)
      label_mask = to_one_hot(target, num_classes=num_classes).float()
      correct_logit = torch.sum(label_mask * input, dim=1)
      wrong_logit = torch.max((1.0 - label_mask) * input, dim=1)[0]
      loss = -F.relu(correct_logit - wrong_logit + 50.0).sum()
      return loss
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the CarliniWagnerLoss obj's underlying member method code with example usage: obj.forward(input, target) and returns: loss