Skip to content

Divergence of EM updates due to possible memory aliasing/overwrite #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ebattenberg opened this issue Jul 10, 2013 · 0 comments
Open

Comments

@ebattenberg
Copy link

Using the cilk backend, I've experienced some unexplained behavior when using the train method. Sometimes when using a large dataset N = 7.5x10^6, D = 13, the EM iterations result in nonsense sparse mean vectors with large covariances. But when making copy of the dataset (data = data.copy()) before training, the result converges to meaningful mean vectors as expected.

Steps to reproduce:

  1. initialize parameters using sklearn's kmeans++
  2. initialize gmm specializer with diag covariance, any number of components
  3. set components to initialized parameters.
  4. run gmm.train(data)
  5. get crazy mean vectors.

If I add "data = data.copy()" or anything else that causes the memory to be copied to a new location before step 4, the strange behavior doesn't occur.
Also, when loading smaller datasets this does not occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant