Version Compatibility Problem : great amount of memory consuming and Keract running slowly
KaimingZhu opened this issue · 4 comments
The problem is caused by environment below in Windows10 :
- tensorflow-gpu 1.15.0
- keras 2.3.1
- GTX 1080 ti
- CUDA 10.0 with Cudnn 7.6.4
everything is OK but when I use the keract function get_activations(model, x, y)
, my memory comsuming reaching nearly 40GB and no any result, warning or error is given, though I just use one example for testing. I have tried keract with version 3.1.0 and 2.9.5, but both of them came with same problem.
But it works well in keract 3.0.2, keras 2.3.1 with tensorflow 2.0.0 in CPU mode. Does it caused by the the GPU mode? Or any other things like the version compatibility? Thanks.
After Changing into the version with
- keract : 3.1.0
- tensorflow-gpu : 2.0.0
- keras : 2.3.1
The comsuming of memory was solved, and the way I solve it is to install the package listed in /example/requirement.txt.
But something strange still happen. When I try with the heat_map.py
, the fuction get_activations()
is executed in a normal speed(i.e. a few seconds).
But when I use the same fuction with Cifar100 training with Alexnet, the function was executed for nearly five minutes to get the activations of one picture.
I think this phenomenon is like the issue#74, which is considered as an unsolved bug. But I need to finish my project as soon as possible.. Can any one who see this issue provide your environment that can successfully applied keract and keras with tensorflow background? Thanks a lot :)
The Problem is solved in final
-
Why Keract Running Slowly
- Ans : That is due to the problem of slowly training with tensorflow 2.0, this problem arise when Keract use the learning pharse to compute gradient and activation output. To improve the performance, you can try tensorflow 2.1 with the Keract 3.0.2
-
A compatible Version
- Ans : This version list is work for me in Windows 10
- tensorflow 2.1
- Keract 3.0.2
- CUDA 10.1
- Cudnn 7.6.5.32
- GTX 1080 Ti
- Ans : This version list is work for me in Windows 10
A small advice : I think it will be better to list the dependency of Keract in RemdMe.md :)
The problem is solved, And I will close this issue, thanks
@KaimingZhu thank you a LOT for this deep analysis. Very useful. It's advised to use the latest versions of Keract and Tensorflow. I can add a dependency of Tensorflow in the requirements.txt.
@KaimingZhu thank you a LOT for this deep analysis. Very useful. It's advised to use the latest versions of Keract and Tensorflow. I can add a dependency of Tensorflow in the requirements.txt.
You are welcome :)