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
doEvaluation should employ MemoryWorkspace for the output INDArray #6279
Comments
Yes, thanks for flagging, we definitely need to add this. |
AlexDBlack
added a commit
that referenced
this issue
Aug 28, 2018
AlexDBlack
added a commit
that referenced
this issue
Aug 28, 2018
Merged
Thanks for the issue - added here: #6295 |
AlexDBlack
added a commit
that referenced
this issue
Aug 29, 2018
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I had problems running out of memory during evaluation. Turns out that a standard FF network explicitly does not use a workspace in doEvaluation when creating the output INDArray and then invoking evaluation.eval(..) - that is, the outputOfLayerDetached has the outputWorkspace set to null. This leads this the resulting INDArray to be "garbage-collector scoped", and I could by running watch on nvidia-smi see the memory building up (being consumed) while running through a quite large test dataset - and then getting a memory exception (since the GC didn't run during the entire loop).
By reimplementing the doEvaluation and invoking System.gc() in the loop, I avoided this, and getting zero buildup of memory - but obviously got a massive performance hit.
However, by instead reimplementing doEvaluation to employ a Memory WS, giving the ws to the outputOfLayerDetached (but still scopeOutOfWorkspaces(..) when invoking ROC.eval(..)), I got zero build-up of memory during that loop, and without any performance hit.
The text was updated successfully, but these errors were encountered: