Deep learning book RBM Equition 20.15 how is the conditional distribution derived? I was reading the DL textbook from here. I understand how the probability of individual elements of hidden layer h gets derived. However, I could not understand the equation (20.15), which derive the conditional distribution of hidden layer h over visible layer v. Here is a screenshot from the textbook

I hope to get some explanation of how it is derived. Any help would be appreciated. Thank you very much!
 A: To make it more explicit please see my derivation here: 
\begin{align}
P(h_j=1|v)&= \frac{\hat P(h_j=1|v)}{\hat P(h_j=0|v) + \hat P(h_j=1|v)}\\ 
&= \frac{\frac{1}{Z'}exp(\{c_j+v^T W_{:,j}\})}{\frac{1}{Z'} exp(\{c^T 0 + v^T W 0\}) + \frac{1}{Z'}exp(\{c_j+v^T W_{:,j}\})}\\  
&= \frac{exp(\{c_j+v^T W_{:,j}\})}{exp(0) + exp(\{c_j+v^T W_{:,j}\})} \\ 
&= \frac{exp(\{c_j+v^T W_{:,j}\})}{1 + exp(\{c_j+v^T W_{:,j}\})} \\
&=  \sigma(c_j+v^T W_{:,j})
\end{align}
How to get the second equality? We can see from the 20.11 or 20.9 that for all $h$ except $h_j$ the $c_j h_j + v^T W_{:,j} h_j$ are all 0. 
How can we obtain the 20.15? It's because that given $v$ all $h_j$ are independent from each other. Then:      
$$P(h|v) = \prod_{j=1} ^{n_h} P(h_j|v)$$
which is what 20.15 represents(for the element-wise product part, we can get 20.14 if we replace $h$ with 1, but the equation becomes strange when $h$ is 0). And because the $h$ and $v$ are symmetric we can apply the same derivation for $v$ given $h$ and obtain a symmetric equality for $P(v|h)$. 
