<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>

CC BY-SA 4.0
2021-02-17T18:38:32.733Z
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.
barnhillec
CC BY-SA 4.0
2021-02-17T18:43:18.930Z
It will model the relationship between sex and age. You can reduce the number of units though.
Abhishek Verma
CC BY-SA 4.0
2021-02-17T19:09:34.023Z
That makes sense, in classical modeling there's a max of 1 interaction but I would suspect 3 nodes is all a person needs.
barnhillec
CC BY-SA 4.0
2021-02-17T18:22:52.483Z
2021-02-17T18:22:52.483Z
Abhishek Verma
<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>

<convolutional-neural-networks><papers><embeddings>
Converting age and sex variables to a 64-unit dense layer
barnhillec
# 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.  

---

