Skip to content

Instantly share code, notes, and snippets.

@freedomtowin
Created May 11, 2018 16:09
Show Gist options
  • Save freedomtowin/d7a8690837588dd328359fe1ff7ab6cf to your computer and use it in GitHub Desktop.
Save freedomtowin/d7a8690837588dd328359fe1ff7ab6cf to your computer and use it in GitHub Desktop.
convergence = (best_parameter-np.mean(param_by_iter[-10:,:],axis=0))/(np.std(param_by_iter[-10:,:],axis=0))
if np.all(np.abs(convergence)<1):
print(‘converged’)
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment