Answers.Body: <p>Convert them into numbers (using one-hot vectors or direct numerical representations) and then concatenate them. Then, you can pass them through the Dense layer.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-17T18:38:32.733Z
Answers.Text: So, I create a dense component with an input vector of size two, which immediately fans out to a fully connected layer of 64 nodes? What would the benefit of that be? I don't see what advantage this holds over just having a node for the sex and a node for the age.
Answers.UserDisplayName: barnhillec
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-17T18:43:18.930Z
Answers.Text: It will model the relationship between sex and age. You can reduce the number of units though.
Answers.UserDisplayName: Abhishek Verma
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-17T19:09:34.023Z
Answers.Text: That makes sense, in classical modeling there's a max of 1 interaction but I would suspect 3 nodes is all a person needs.
Answers.UserDisplayName: barnhillec
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-17T18:22:52.483Z
Answers.LastActivityDate: 2021-02-17T18:22:52.483Z
Answers.UserDisplayName: Abhishek Verma
Body: <p>I am studying a preprint for my own learning (<a href="https://www.medrxiv.org/content/medrxiv/early/2020/04/27/2020.04.23.20067967.full.pdf" rel="nofollow noreferrer">https://www.medrxiv.org/content/medrxiv/early/2020/04/27/2020.04.23.20067967.full.pdf</a>) and I am befuddled by the following detail of the neural network architecture:</p>
  <p><a href="https://i.sstatic.net/MAbIL.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MAbIL.png" alt="architecture_snippet" /></a></p>
  <p>This is in accord with the paper's description of the architecture (p. 5):</p>
  <blockquote>
  <p>Age and sex were input into a 64-unit hidden layer and was concatenated with the other branches.</p>
  </blockquote>
  <p>How can the two scalars of age and sex be implemented as a 64-unit dense layer?</p>
  
Tags: <convolutional-neural-networks><papers><embeddings>
Title: Converting age and sex variables to a 64-unit dense layer
UserDisplayName: barnhillec
ThreadText: # Converting age and sex variables to a 64-unit dense layer
  
  (Asked by: username_0 on 2021-02-17)
  
  I am studying a preprint for my own learning (<https://www.medrxiv.org/content/medrxiv/early/2020/04/27/2020.04.23.20067967.full.pdf>) and I am befuddled by the following detail of the neural network architecture:
  
  [![architecture_snippet](https://i.sstatic.net/MAbIL.png)](https://i.sstatic.net/MAbIL.png)
  
  This is in accord with the paper's description of the architecture (p. 5):
  
  > Age and sex were input into a 64-unit hidden layer and was concatenated with the other branches.
  
  How can the two scalars of age and sex be implemented as a 64-unit dense layer?
  
  **Tags:** convolutional-neural-networks, papers, embeddings
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-02-17. Score: 2 | Accepted answer
  
  Convert them into numbers (using one-hot vectors or direct numerical representations) and then concatenate them. Then, you can pass them through the Dense layer.
  
  > **Comments:**
  > **username_0**: So, I create a dense component with an input vector of size two, which immediately fans out to a fully connected layer of 64 nodes? What would the benefit of that be? I don't see what advantage this holds over just having a node for the sex and a node for the age.  
  > **username_1**: It will model the relationship between sex and age. You can reduce the number of units though.  
  > **username_0**: That makes sense, in classical modeling there's a max of 1 interaction but I would suspect 3 nodes is all a person needs.  
  
  ---
  
  