How to calculate the number of connections in a Deep Network?

2

I have exactly this scenario and I need to know how many connections this set has. I searched in several places and I'm not sure of the answer. That is, I do not know how to calculate the number of connections on my network, this is still unclear to me. What I have is exactly the following:

** Having bias in everything except input - Input: 784 - First hidden layer   - Output: 400 - Second hidden layer   - Output: 200 - Output layer   - Output: 10

I would calculate this as follows:     (Bs) + ((400 * 200) + bias) + ((200 * 10) + bias) = XXX

I do not know if this is correct. I need help figuring out how to solve this, and if it's not just something mathematical, what's the theory to do this calculation?

Thank you.

    
asked by anonymous 23.04.2018 / 04:11

1 answer

0

If you write this as matrix multiplication - as I see it - it's easier to calculate the number of parameters (or if you want to call connections) from your network.

Suppose your input X is a% cos_de% matrix where X[n, 784] is the number of observations.

A network with 2 layers one with 200 neurons and one with 10. It would be something + - like this:

Y[n, 10] = ativacao(X[n,784]*P1[784, 200] + B1[200])*P2[200,10] + B2[10]

Where n , P1 , P2 , B1 are parameter arrays. Now you can check if your account is correct, just count the number of elements of the parameter arrays.

In the case: 784 * 200 + 200 + 200 * 10 + 10

    
26.04.2018 / 07:25