class_docstr: This loss computes the BCEWithLogitsLoss with corrections applied to account
  for randomized response, where the input `alpha` represents the probability
  of flipping a label.
  
  The loss can be described as:
  
  .. math::
      p = \sigma(x)
  
  .. math::
      r = \alpha * p + (1 - \alpha) * (1 - p)
  
  .. math::
      \ell(x, y) = mean(L) = mean(\{l_1,\dots,l_N\}^\top), \quad
      l_n = - \left [ y_n \cdot \log r_n + (1 - y_n) \cdot \log (1 - r_n) \right ],
  
  This is used for measuring the error of a reconstruction in for example an
  auto-encoder. Note that the targets t[i] should be numbers between 0 and 1.
class_docstr_tok: ["This","loss","computes","the","BCEWithLogitsLoss","with","corrections","applied","to","account","for","randomized","response",",","where","the","input","`","alpha","`","represents","the","probability","of","flipping","a","label",".","The","loss","can","be","described","as",":","..","math",":",":","p","=","\\sigma","(","x",")","..","math",":",":","r","=","\\alpha","*","p","+","(","1","-","\\alpha",")","*","(","1","-","p",")","..","math",":",":","\\ell","(","x",",","y",")","=","mean","(","L",")","=","mean","(","\\","{","l_1",",","\\dots",",","l_N\\","}","^\\top",")",",","\\quad","l_n","=","-","\\left","[","y_n","\\cdot","\\log","r_n","+","(","1","-","y_n",")","\\cdot","\\log","(","1","-","r_n",")","\\right","]",",","This","is","used","for","measuring","the","error","of","a","reconstruction","in","for","example","an","auto-encoder",".","Note","that","the","targets","t","[","i","]","should","be","numbers","between","0","and","1","."]
code: def __init__(self, alpha, reduction="mean", skip_forward=False):
      super(RAPPORLoss, self).__init__(
          reduction=reduction, skip_forward=skip_forward
      )
      self.alpha = alpha
  
imports: import crypten
  import torch
  from .module import Module
label_desc: Use image node_id 1 to create a new RAPPORLoss object from inherited base classes: _Loss with example: obj = RAPPORLoss(alpha, reduction, skip_forward)