original_docstring: Extracts and summarizes the loss.
docstring: Extracts and summarizes the loss.
docstring_tokens: Extracts and summarizes the loss .
code: def _extract_loss(loss):
    """Extracts and summarizes the loss."""
    if not isinstance(loss, tuple):
      actual_loss = _normalize_loss(loss)
      tboard_loss = actual_loss
    else:
      actual_loss = _normalize_loss(loss[0], den=loss[1])
      tboard_loss = _normalize_loss(loss[0], den=loss[2]) if len(loss) > 2 else actual_loss
    tf.summary.scalar("loss", tboard_loss)
    return actual_loss
code_tokens: def _extract_loss ( loss ) : if not isinstance ( loss , tuple ) : actual_loss = _normalize_loss ( loss ) tboard_loss = actual_loss else : actual_loss = _normalize_loss ( loss [ 0 ] , den = loss [ 1 ] ) tboard_loss = _normalize_loss ( loss [ 0 ] , den = loss [ 2 ] ) if len ( loss ) > 2 else actual_loss tf . summary . scalar ( "loss" , tboard_loss ) return actual_loss
short_docstring: Extracts and summarizes the loss.
short_docstring_tokens: Extracts and summarizes the loss .
comment: """Extracts and summarizes the loss."""