-
Notifications
You must be signed in to change notification settings - Fork 9
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
Memory usage in numerical hessian #26
Comments
A possible point to improve could be to use the new map-reduce operations: I'll look at that problem again as soon as my thesis is over / extended. |
@Hoeze I am checking this now, I think there is a some other problem here, too. |
The memory load goes up here in diffxpy/testing/base.py:_fit() |
Yes, this is due to calculating the Hessian for sure. |
Maybe this will improve if a sparse matrix representation is used? |
Do you get this memory load also when running on a single core? I assumed it might have something to do with private copies of the data in each thread. |
Yes, also on a single core. I also don't think that linear algebra multi-threading, ie. distributing matrix multiplications, should cause memory copying, but that is just a guess. |
/Users/david.fischer/miniconda3/lib/python3.6/site-packages/tensorflow/python/ops/gradients_impl.py:108: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory. is thrown during |
So I guess IndexedSlices are used in tf.map_fn to map the hessian function across the slices of X and param. I do not see why anything here would be sparse though if X is dense in the input. Where is sparsity of X handled in batchglm @Hoeze? |
I think this is internally used by tf.hessians. |
Accidently posted the the resolving comment in a related issue: |
I have a peak memory load of 45GB on 500 cells, I believe this is during hessian estimation, on a test data set. That should not be the case I think, it s only 10 or so parameters? We should go over step by step whether really only the relevant parts of the overall hessian are computed.
The text was updated successfully, but these errors were encountered: