code: def align_targets(predictions, targets):
      """Helper function turning a target 1D vector into a column if needed.
      This way, combining a network of a single output unit with a target vector
      works as expected by most users, not broadcasting outputs against targets.
  
      Parameters
      ----------
      predictions : Theano tensor
          Expression for the predictions of a neural network.
      targets : Theano tensor
          Expression or variable for corresponding targets.
  
      Returns
      -------
      predictions : Theano tensor
          The predictions unchanged.
      targets : Theano tensor
          If `predictions` is a column vector and `targets` is a 1D vector,
          returns `targets` turned into a column vector. Otherwise, returns
          `targets` unchanged.
      """
      if (
          getattr(predictions, "broadcastable", None) == (False, True)
          and getattr(targets, "ndim", None) == 1
      ):
          targets = as_theano_expression(targets).dimshuffle(0, "x")
      return predictions, targets
  
file_path: Lasagne/lasagne/objectives.py
imports: import theano.tensor
  from .utils import as_theano_expression
label_desc: Use image node_id 1 for calling a global function with example usage: align_targets(predictions, targets) and returns: predictions,  targets