Cost function¶
-
class
mlbase.cost.
CostFunc
[source]¶ General cost function base class.
Y: result from forward network. tY: the given true result.
-
class
mlbase.cost.
TwoStageCost
[source]¶ Cost function that needs two stage computation.
Step 1: obtain data statistics. Step 2: obtain label for each sample.
-
class
mlbase.cost.
IndependentCost
[source]¶ Cost function for each sample cost known and final cost is a statistics for all sample cost.
-
mlbase.cost.
aggregate
(loss, weights=None, mode='mean')[source]¶ This code is from lasagne/objectives.py
-
class
mlbase.cost.
ImageDiff
[source]¶ This is the base class for cost function for images. The input format is like:
tensor4, (patch, channel, column, row)The channel should be 1 or 3.