-
Notifications
You must be signed in to change notification settings - Fork 272
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
Doesn't seemingly work with latest TF versions. #29
Comments
I have not tried with versions after 1.5. What's the error? Maybe try turning off all optimizations? Something like this (probably needs adjustment for latest version)
|
No explicit error, just doesn’t seemingly work like in 1.5 . |
Nope this doesn't seem to work even in 1.11; even if graph optimisations are turned off. |
Not woking in 1.11, it works smooth for a while and then (randomly) throws OOM exception. |
As a work around I’ve been using |
Same here. A batch of 100 and above (224*224*3) throws the OOM. VGG16 can load a batch of UP TO 100 images if it's checkpointed manually. |
I find that the tests (
|
Today I compiled the 1.12 version from sources and this library works well. @ekyy2 this is just because of moving packages, if you replace the import by |
If using TF you can manually wrap layers like I mention above you can make larger memory gains but your files per second will drop if done inefficiently - probably matters less if you need more memory. |
@joeyearsley did the |
Here is an example with Densenet: Be wary when using with dropout though, you'll need to implement a new dropout layer which takes an |
That did the trick! |
Hi Joey, how do you use |
Yes I stopped using |
Thanks for your reply Joey. I can see that you recompute the gradient. I'm just slightly lost as to where in the code you drop gradients from memory as well. |
A tensor is dropped automatically as long as it no longer has downstream consumers, this is what checkpoints_disconnected is for -- because of stop_gradient it doesn't need to keep activations in memory, and then |
Thanks yaroslavvb. Unfortunately, I have not found |
Same issue. |
Tested in TF 1.15, using Keras. No luck for me.
|
Having successfully used this when it came out with TF 1.5 it seemingly doesn't work anymore in TF 1.9.
@yaroslavvb Do you have a working version still? Or do you have any insights as to what might have changed?
The text was updated successfully, but these errors were encountered: