Convergence of the Wake-Sleep Algorithm