Skip to content

Commit

Permalink
Clarify docstring for categorical cross-entropy
Browse files Browse the repository at this point in the history
  • Loading branch information
Sentient07 authored and f0k committed Sep 8, 2017
1 parent 6327a74 commit f3dc0bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lasagne/objectives.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ def categorical_crossentropy(predictions, targets):
.. math:: L_i = - \\sum_j{t_{i,j} \\log(p_{i,j})}
:math:`p` are the predictions, :math:`t` are the targets, :math:`i`
denotes the data point and :math:`j` denotes the class.
Parameters
----------
predictions : Theano 2D tensor
Expand All @@ -157,6 +160,8 @@ def categorical_crossentropy(predictions, targets):
targets : Theano 2D tensor or 1D tensor
Either targets in [0, 1] matching the layout of `predictions`, or
a vector of int giving the correct class index per data point.
In the case of an integer vector argument, each element
represents the position of the '1' in a one-hot encoding.
Returns
-------
Expand Down

0 comments on commit f3dc0bb

Please sign in to comment.