0
$\begingroup$

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

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?

$\endgroup$
0

1 Answer 1

2
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ 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. $\endgroup$
    – barnhillec
    Feb 17, 2021 at 18:38
  • 1
    $\begingroup$ It will model the relationship between sex and age. You can reduce the number of units though. $\endgroup$ Feb 17, 2021 at 18:43
  • $\begingroup$ That makes sense, in classical modeling there's a max of 1 interaction but I would suspect 3 nodes is all a person needs. $\endgroup$
    – barnhillec
    Feb 17, 2021 at 19:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .