I have a kind of euclidean loss function which is:
\sum_{i,j} c_i*max{0,y_{ji}-k_{ji}} + p_i*max{0,k_{ji}-y_{ji}}
which y_{ji}
are the output of caffe and k_{ji}
are the real output value, i
is the index of the items and j
is index of samples.
The issue is about getting the values of parameters c_i
and p_i
.
When I have c_i = c_q for all i \neq q
, and similarly for p_i
, I simply get the values of them as parameters of the loss layer (I added two new parameters in the caffe.proto). However, the problems is that now I have around 300 items so that it is not reasonable to get them as loss layer parameters.
I tried to get their values in the loss layer, I mean I tried to add another bottom layer
for loss layer, but it gave an error.
I am stuck here!
Please guide me how I can solve this issue.
Thanks in advance, Afshin