$sumlimits_{j=1}^{M}{ log(exp(sumlimits_{h_{j}=0,h_{j}=1}{ (v_{i}w_{ij}h_{j} +h_{j}a_{j}+v_{i}b_{i})} )) }$
=$v_{i}b_{i}+sumlimits_{j=1}^{M}{log(1+exp( v_{i}w_{ij}+a_{j}) )}$
$sumlimits_{j=1}^{M}{ log(exp(sumlimits_{h_{j}=0,h_{j}=1}{ (v_{i}w_{ij}h_{j} +h_{j}a_{j}+v_{i}b_{i})} )) }$
=$v_{i}b_{i}+sumlimits_{j=1}^{M}{log(1+exp( v_{i}w_{ij}+a_{j}) )}$