File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -56,3 +56,17 @@ Note that non-relative imports to these files will `not` work:
56
56
57
57
import backend
58
58
from utils import img_utils, ml_utils
59
+
60
+ Limiting GPU memory Growth
61
+ -----------------------------------------
62
+
63
+ By default, OpenVisionCapsules maps all available memory of all visible CUDA configured GPUs.
64
+ To prevent this, use following Environment flag while using Tensorflow.
65
+
66
+ .. code-block :: python
67
+
68
+ TF_FORCE_GPU_ALLOW_GROWTH = True
69
+
70
+ - This Environment variable is only applicable to Tensorflow.
71
+
72
+ For proper reference, visit Tensorflow: https://www.tensorflow.org/guide/gpu#limiting_gpu_memory_growth
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def get_all_devices() -> List[str]:
29
29
# TODO: Use tf.config.list_physical_devices in TF 2.1
30
30
# TODO: Remove the config when using TF_FORCE_GPU_ALLOW_GROWTH\
31
31
# environment variable
32
- _process_gpu_options = tf .GPUOptions (allow_growth = True )
32
+ _process_gpu_options = tf .GPUOptions ()
33
33
config = tf .ConfigProto (gpu_options = _process_gpu_options )
34
34
35
35
with tf .Session (config = config ):
You can’t perform that action at this time.
0 commit comments