Body: <p>I am trying to create an environment for RL where the size of my input (observation space) is not fixed. As a way around it, I thought about padding the size to a maximum value and then assigning &quot;null&quot; to those values that do not exist. Now, these &quot;null&quot; values are meaningful in a certain sense, because they are related to the shape and size of the input.</p>
  <p>If these &quot;null&quot; values were zeros, would neural networks be able to distinguish between these zeros (nulls) and the zeros that are actually part of the picture? If that's not the case, should I assign a different number for the padding? What should I be mindful of in these scenarios? Is there any example I can look at with a similar situation?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-06T19:36:57.273Z
Comments.Text: For neural networks, you can find the same question here: https://ai.stackexchange.com/q/2008/4446
Comments.UserDisplayName: OmG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-06T20:37:10.750Z
Comments.Text: Another solution can be using auto-encoders to embed input vectors into the same meaningful space with the same dimension.
Comments.UserDisplayName: OmG
Tags: <neural-networks><reinforcement-learning><observation-spaces><padding>
Title: How do neural networks deal with inputs of different sizes that are padded in order to have them of the same size?
UserDisplayName: user101464
ThreadText: # How do neural networks deal with inputs of different sizes that are padded in order to have them of the same size?
  
  (Asked by: username_0 on 2021-08-06)
  
  I am trying to create an environment for RL where the size of my input (observation space) is not fixed. As a way around it, I thought about padding the size to a maximum value and then assigning "null" to those values that do not exist. Now, these "null" values are meaningful in a certain sense, because they are related to the shape and size of the input.
  
  If these "null" values were zeros, would neural networks be able to distinguish between these zeros (nulls) and the zeros that are actually part of the picture? If that's not the case, should I assign a different number for the padding? What should I be mindful of in these scenarios? Is there any example I can look at with a similar situation?
  
  **Tags:** neural-networks, reinforcement-learning, observation-spaces, padding
  
  > **Comments:**
  > **username_1**: For neural networks, you can find the same question here: https://ai.stackexchange.com/q/2008/4446  
  > **username_1**: Another solution can be using auto-encoders to embed input vectors into the same meaningful space with the same dimension.  
  
  ---
  
  ## 0 answers
  
  