code: def training_loss(weights):
      # Training loss is the negative log-likelihood of the training labels.
      preds = logistic_predictions(weights, inputs)
      label_probabilities = preds * targets + (1 - preds) * (
          1 - targets
      )
      return -np.sum(np.log(label_probabilities))
  
file_path: autograd/examples/logistic_regression.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  from builtins import range
  import autograd.numpy
  from autograd import grad
  from autograd.test_util import check_grads
label_desc: Use image node_id 3 for calling a global function with example usage: training_loss(weights) and returns: unknown