class_docstr: Computes the cross-entropy loss between true labels and predicted labels.
  
  Args:
      from_logits: Whether to interpret `y_pred` as a tensor of
      [logit](https://en.wikipedia.org/wiki/Logit) values. By default we assume
          that `y_pred` contains probabilities (i.e., values in [0, 1]).
code: def grad(self, y_true, y_pred):
      batch_size = y_true.shape.as_list()[0]
      batch_size_inv = 1 / batch_size
      if self.from_logits:
          y_pred = tfe.sigmoid(y_pred)
      grad = y_pred - y_true
      if not self.lazy_normalization:
          grad = grad * batch_size_inv
      return grad
  
imports: import tf_encrypted
label_desc: Use image node_id 2 for calling the BinaryCrossentropy obj's underlying member method code with example usage: obj.grad(y_true, y_pred) and returns: grad