Answers.Body: <p>I would expect the dense layers to be able to detect certain speed ranges. This neuron activates for 0-10, this one for 10-20, this one for 20-30, this one for 20-50, this one for 47.6-89.2...</p>
  <p>Of course a later layer could also do that, but it looks like there aren't many layers after this one.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-29T12:09:56.183Z
Answers.LastActivityDate: 2021-09-29T12:09:56.183Z
Answers.UserDisplayName: Criticize SE actions means ban
Answers.Body: <p>Paper 1-</p>
  <p>If I'm understanding the paper correctly, the &quot;Measurements &quot; just represents a collection of auxiliary information.  It's not necessarily a single speed measurement, but any auxiliary information, so perhaps gas level, engine temperature, etc. I think them choosing to show a speedometer as a measurement might not be the best choice considering they are predicting the speed value.</p>
  <p>Paper 2-</p>
  <p>They said in the paper</p>
  <blockquote>
  <p>The information of both turn indicators (on or off) is mapped to the values 1.0 and 0.0, respectively. However, the turn indicators do not contain any structural information  convolutional layers can make use of. For this reason, this additional  information is directly fed into the second fully connected layer after the  feature extraction layer (which then contains 102 hidden units).</p>
  </blockquote>
  <p>So perhaps feeding a value of 1 into the network at that level is just too small of a value to have any effect at the layer they are injecting the information. Perhaps the layer they are injecting has a average weight magnitude that is high enough that injecting a single 1 would be close to injecting a 0.  This is my best guess.  I would expect the network would be able to adjust the weights by themselves, but there are many things that could go wrong here.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-29T14:02:01.373Z
Answers.LastActivityDate: 2021-09-29T14:02:01.373Z
Answers.UserDisplayName: John Rothman
Body: <p>I understand that in order to add additional inputs to a CNN, e.g. in self driving, I can append the data to a flattened layer after the convolutions and before the fully connected layers.</p>
  <p>However, a few things confuse me. In a paper the authors want to feed speed measurements into the driving network. Instead of just appending a normalized speed value, they first feed it into several FC layers. Why would they do that? What kind of features could you extract from a single real value? Could there be another reason?</p>
  <p><a href="https://i.sstatic.net/WZZKi.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WZZKi.jpg" alt="enter image description here" /></a>
  <a href="https://i.sstatic.net/bMkYP.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bMkYP.jpg" alt="enter image description here" /></a>
  (p. 3, <a href="https://arxiv.org/pdf/1906.03199.pdf" rel="nofollow noreferrer">paper 1</a>)</p>
  <p>Part two of my question is: In another paper, information about the turn signal is appended to a layer as one-hot encoding. The authors talk about how that didn’t work due to vanishing weights (not gradients). So they scaled weights by a constant factor. What do they mean by vanishing weights and how do I scale weights (e.g. in PyTorch)?</p>
  <p><a href="https://i.sstatic.net/19mLs.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/19mLs.jpg" alt="enter image description here" /></a>
  (p. 6, <a href="https://www.researchgate.net/profile/Christian-Hubschneider/publication/320508702_Adding_Navigation_to_the_Equation_Turning_Decisions_for_End-to-End_Vehicle_Control/links/59f048be458515c3cc438284/Adding-Navigation-to-the-Equation-Turning-Decisions-for-End-to-End-Vehicle-Control.pdf?origin=publication_detail#page16" rel="nofollow noreferrer">paper 2</a>)</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-09-27T15:13:00.707Z
Comments.Text: Where exactly those are mention in the papers? Could you give page or equation numbers?
Comments.UserDisplayName: serali
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-09-27T19:07:39.257Z
Comments.Text: @serali I have added screenshots and page numbers.
Comments.UserDisplayName: Benjoyo
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-09-27T21:14:22.983Z
Comments.Text: I don't see anything obvious to answer question 1.  i have to wonder if this is a matter of, "We used some dense layers and it worked, so that's the way you should do it."
Comments.UserDisplayName: David Hoelzer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-09-29T13:16:53.227Z
Comments.Text: Hello. Please, **ask only one question per post**. If you have 2 questions, create another post where you ask the second question. Otherwise, this post could be closed as **too broad**.
Comments.UserDisplayName: nbro
Tags: <convolutional-neural-networks><weights><dense-layers><input-layer>
Title: Correctly input additional values into CNN
UserDisplayName: Benjoyo
ThreadText: # Correctly input additional values into CNN
  
  (Asked by: username_0 on 2021-09-27)
  
  I understand that in order to add additional inputs to a CNN, e.g. in self driving, I can append the data to a flattened layer after the convolutions and before the fully connected layers.
  
  However, a few things confuse me. In a paper the authors want to feed speed measurements into the driving network. Instead of just appending a normalized speed value, they first feed it into several FC layers. Why would they do that? What kind of features could you extract from a single real value? Could there be another reason?
  
  [![enter image description here](https://i.sstatic.net/WZZKi.jpg)](https://i.sstatic.net/WZZKi.jpg)
  [![enter image description here](https://i.sstatic.net/bMkYP.jpg)](https://i.sstatic.net/bMkYP.jpg)
  (p. 3, [paper 1](https://arxiv.org/pdf/1906.03199.pdf))
  
  Part two of my question is: In another paper, information about the turn signal is appended to a layer as one-hot encoding. The authors talk about how that didn’t work due to vanishing weights (not gradients). So they scaled weights by a constant factor. What do they mean by vanishing weights and how do I scale weights (e.g. in PyTorch)?
  
  [![enter image description here](https://i.sstatic.net/19mLs.jpg)](https://i.sstatic.net/19mLs.jpg)
  (p. 6, [paper 2](https://www.researchgate.net/profile/Christian-Hubschneider/publication/320508702_Adding_Navigation_to_the_Equation_Turning_Decisions_for_End-to-End_Vehicle_Control/links/59f048be458515c3cc438284/Adding-Navigation-to-the-Equation-Turning-Decisions-for-End-to-End-Vehicle-Control.pdf?origin=publication_detail#page16))
  
  **Tags:** convolutional-neural-networks, weights, dense-layers, input-layer
  > **Comments:**
  > **username_1**: Where exactly those are mention in the papers? Could you give page or equation numbers?  
  > **username_0**: @serali I have added screenshots and page numbers.  
  > **username_2**: I don't see anything obvious to answer question 1.  i have to wonder if this is a matter of, "We used some dense layers and it worked, so that's the way you should do it."  
  > **username_3**: Hello. Please, **ask only one question per post**. If you have 2 questions, create another post where you ask the second question. Otherwise, this post could be closed as **too broad**.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_4 on 2021-09-29. Score: 1
  
  I would expect the dense layers to be able to detect certain speed ranges. This neuron activates for 0-10, this one for 10-20, this one for 20-30, this one for 20-50, this one for 47.6-89.2...
  
  Of course a later layer could also do that, but it looks like there aren't many layers after this one.
  
  
  ---
  
  ### Answer by username_5 on 2021-09-29. Score: 1
  
  Paper 1-
  
  If I'm understanding the paper correctly, the "Measurements " just represents a collection of auxiliary information. It's not necessarily a single speed measurement, but any auxiliary information, so perhaps gas level, engine temperature, etc. I think them choosing to show a speedometer as a measurement might not be the best choice considering they are predicting the speed value.
  
  Paper 2-
  
  They said in the paper
  
  > The information of both turn indicators (on or off) is mapped to the values 1.0 and 0.0, respectively. However, the turn indicators do not contain any structural information convolutional layers can make use of. For this reason, this additional information is directly fed into the second fully connected layer after the feature extraction layer (which then contains 102 hidden units).
  
  So perhaps feeding a value of 1 into the network at that level is just too small of a value to have any effect at the layer they are injecting the information. Perhaps the layer they are injecting has a average weight magnitude that is high enough that injecting a single 1 would be close to injecting a 0. This is my best guess. I would expect the network would be able to adjust the weights by themselves, but there are many things that could go wrong here.
  
  
  ---
  
  