code: def binary_crossentropy(target, output, from_logits=False):
      target = convert_to_tensor(target)
      output = convert_to_tensor(output)
  
      if target.shape != output.shape:
          raise ValueError(
              "Arguments `target` and `output` must have the same shape. "
              "Received: "
              f"target.shape={target.shape}, output.shape={output.shape}"
          )
      # By default, PyTorch, does reduction of `sum` over all rows,
      # change reduction to `none` to keep dim
      if from_logits:
          return tnn.binary_cross_entropy_with_logits(
              output, target, reduction="none"
          )
      else:
          output = torch.clip(output, epsilon(), 1.0 - epsilon())
          return tnn.binary_cross_entropy(
              output, target, reduction="none"
          )
  
imports: import torch
  import torch.nn.functional
  import tree
  from keras.backend import standardize_data_format
  from keras.backend import standardize_dtype
  from keras.backend.common.backend_utils import compute_conv_transpose_padding_args_for_torch
  from keras.backend.config import epsilon
  from keras.backend.torch.core import cast
  from keras.backend.torch.core import convert_to_tensor
  from keras.backend.torch.core import get_device
  from keras.backend.torch.numpy import expand_dims
  from keras.backend.torch.numpy import maximum
  from keras.backend.torch.numpy import where
  from keras.utils.argument_validation import standardize_tuple
label_desc: Use image node_id 32 for calling a global function with example usage: binary_crossentropy(target, output, from_logits) and returns: tnn, tnn