code: def binary_cross_entropy(
      output, target, epsilon=1e-8, name="bce_loss"
  ):
      """Binary cross entropy operation.
  
      Parameters
      ----------
      output : Tensor
          Tensor with type of `float32` or `float64`.
      target : Tensor
          The target distribution, format the same with `output`.
      epsilon : float
          A small value to avoid output to be zero.
      name : str
          An optional name to attach to this function.
  
      References
      -----------
      - `ericjang-DRAW <https://github.com/ericjang/draw/blob/master/draw.py#L73>`__
  
      """
      #     with ops.op_scope([output, target], name, "bce_loss") as name:
      #         output = ops.convert_to_tensor(output, name="preds")
      #         target = ops.convert_to_tensor(targets, name="target")
  
      # with tf.name_scope(name):
      return tf.reduce_mean(
          tf.reduce_sum(
              -(
                  target * tf.math.log(output + epsilon)
                  + (1.0 - target) * tf.math.log(1.0 - output + epsilon)
              ),
              axis=1,
          ),
          name=name,
      )
  
imports: import numbers
  import tensorflow
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops, math_ops, nn_ops, standard_ops
  from tensorlayer import logging
label_desc: Use image node_id 3 for calling a global function with example usage: binary_cross_entropy(output, target, epsilon, name) and returns: tf