chainer.functions.decov¶
-
chainer.functions.
decov
(h, reduce='half_squared_sum')[source]¶ Computes the DeCov loss of
h
The output is a variable whose value depends on the value of the option
reduce
. If it is'no'
, it holds a matrix whose size is same as the number of columns ofy
. If it is'half_squared_sum'
, it holds the half of the squared Frobenius norm (i.e. squared of the L2 norm of a matrix flattened to a vector) of the matrix.- Parameters
h (
Variable
or N-dimensional array) – Variable holding a matrix where the first dimension corresponds to the batches.recude (str) – Reduction option. Its value must be either
'half_squared_sum'
or'no'
. Otherwise,ValueError
is raised.
- Returns
A variable holding a scalar of the DeCov loss. If
reduce
is'no'
, the output variable holds 2-dimensional array matrix of shape(N, N)
whereN
is the number of columns ofy
. If it is'half_squared_sum'
, the output variable holds a scalar value.- Return type
Note
See https://arxiv.org/abs/1511.06068 for details.