Body: <p>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 <code>tanh</code> 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?</p>
  <p>I would also be open for papers or publications tackling these kind of problems. Thank you for your help!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-19T23:57:11.433Z
Comments.Text: 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!
Comments.UserDisplayName: Cameron Chandler
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-20T09:01:46.713Z
Comments.Text: @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.
Comments.UserDisplayName: thsolyt
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-20T09:05:00.263Z
Comments.Text: @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.
Comments.UserDisplayName: thsolyt
Tags: <neural-networks><reinforcement-learning><activation-functions><policies><state-of-the-art>
Title: Dynamically adapting activation function
UserDisplayName: thsolyt
ThreadText: # Dynamically adapting activation function
  
  (Asked by: username_0 on 2020-10-19)
  
  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!
  
  **Tags:** neural-networks, reinforcement-learning, activation-functions, policies, state-of-the-art
  > **Comments:**
  > **username_1**: 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!  
  > **username_0**: @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.  
  > **username_0**: @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.  
  
  ---
  
  ## 0 answers
  
  