1
$\begingroup$

I want to implement a DDPG method and obviously, the action space will be continuous. I have three outputs. The first output should be zero or a value between 200 and 400, and the other outputs have similar conditions. I don't know how can I implement this condition in the layers and activation functions. Should I use a binary activation before the scaled sigmoid function? How can I scale the activation function for this example?

(a1 = 0) or (200 < a1 < 400)
(a2 = 0) or (100 < a2 < 500)
(a3 = 0) or (200 < a3 < 1000)

$\endgroup$

1 Answer 1

2
$\begingroup$

generally the approach is to have a separate head. For example, imagine you have latent vector $z_k$, you would output two values: $h(z_k)$ and $f(z_k)$ where $0 \leq h \leq 1$ and $b_0 \leq f \leq b_1$ where $b_0$ and $b_1$ are your bounds.

In thios setup, during inference you would check $h_k$ and if its greater than some threshold (usually .5), youd evaluate/output $f_k$.

In this case your loss would look something like $L_i = L_i^{(1)}(h_i, y_i)+y_i*L_i^{(2)}(f_i,v_i)$ where $(y,v)$ are your labels, and the $L$'s are your loss of choice.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .