My current research project involves adaptive weights for three different loss functions so that I hope each the objective can focus on the different size of objects when given a different size of the input.
Say there are three ranges: $0-300$ is for small objects, $300-900$ is for middle-sized objects and $>900$ is for large objects.
My current design: let's assume input is $x$,
$$
\begin{align*}
y_1&=\frac{1}{1+\exp(-0.01(x-600))}\\
y_2&=\frac{1}{1+\exp(+0.01(x-600))}\\
y_3&= \frac{1}{1 + \exp(-0.02*(x-300)))}+ \frac{1}{1 + \exp(0.02*(x-900))}-1
\end{align*}
$$
However, the problem is $\sum_{i=1,2,3} y_i[x]\neq 1, \forall 0\leq x$. A simple solution to fix is to design two piece-wise functions:
$$
\begin{align*}
y_1&=\frac{1}{1 + \exp(-0.02(x-300)))}+ \frac{1}{1 + \exp(0.02(x-900))}-1\\
y_2&=\frac{1}{1- \exp(+0.02(x-300))}+ \frac{1}{1 + \exp(-0.02(x-900))},
\end{align*}
$$
where $x<600$ for high-pass filter in $y_1$ and $x>600$ for low-pass filter in $y_1$ is zero.
However, I prefer the first continuous functions for its simplicity. By any chance, there exists a more elegant solution where three functions are unit decomposition and not piece-wise? Thanks ahead for any suggestions.
No comments:
Post a Comment