I am training a network through reinforcement learning. The policy network learns rotations, but depending on the actual input (state), the output of the network should be restricted to be in certain bounds otherwise it mostly fails to reach these bounds. I am using tanh as last activation function. So, I wonder if there could be a way to modify this last activation function s.th. it can adaptively change bounds depending on input? Or would this have a negative impact in learning?

I would also be open for papers or publications tackling these kind of problems. Thank you for your help!

  • $\begingroup$ It sounds like the tanh activation function is simply wrong for your purposes, you may like to consider just the identity activation function. If your model has access to these bounds then you could either feed them into the model as extra input, or truncate your model's output, or both! $\endgroup$ Oct 19 '20 at 23:57
  • $\begingroup$ @CameronChandler I have access to the bounds for every input. I could manually truncate the output of the identity activation function, but that would be 'hard coded' in a sense... Besides feeding the bounds as input, I would rather want to tell the network: at this input state, consider only these bounds. $\endgroup$
    – Ardi
    Oct 20 '20 at 9:01
  • $\begingroup$ @pasabaporaqui depending on which state the agent is, the bounds it has to consider will change. And the (-1,1) bounds of tanh allow rotations in the whole 3D space, that's why I need to restrict them dynamically. $\endgroup$
    – Ardi
    Oct 20 '20 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.