Preventing Keras to allocate unnecessary GPU memory

gpus = tf.config.experimental.list_physical_devices(‘GPU’)

for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)


This content originally appeared on DEV Community and was authored by Talles L

gpus = tf.config.experimental.list_physical_devices('GPU')

for gpu in gpus:
  tf.config.experimental.set_memory_growth(gpu, True)


This content originally appeared on DEV Community and was authored by Talles L


Print Share Comment Cite Upload Translate Updates
APA

Talles L | Sciencx (2024-08-19T19:57:28+00:00) Preventing Keras to allocate unnecessary GPU memory. Retrieved from https://www.scien.cx/2024/08/19/preventing-keras-to-allocate-unnecessary-gpu-memory/

MLA
" » Preventing Keras to allocate unnecessary GPU memory." Talles L | Sciencx - Monday August 19, 2024, https://www.scien.cx/2024/08/19/preventing-keras-to-allocate-unnecessary-gpu-memory/
HARVARD
Talles L | Sciencx Monday August 19, 2024 » Preventing Keras to allocate unnecessary GPU memory., viewed ,<https://www.scien.cx/2024/08/19/preventing-keras-to-allocate-unnecessary-gpu-memory/>
VANCOUVER
Talles L | Sciencx - » Preventing Keras to allocate unnecessary GPU memory. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/19/preventing-keras-to-allocate-unnecessary-gpu-memory/
CHICAGO
" » Preventing Keras to allocate unnecessary GPU memory." Talles L | Sciencx - Accessed . https://www.scien.cx/2024/08/19/preventing-keras-to-allocate-unnecessary-gpu-memory/
IEEE
" » Preventing Keras to allocate unnecessary GPU memory." Talles L | Sciencx [Online]. Available: https://www.scien.cx/2024/08/19/preventing-keras-to-allocate-unnecessary-gpu-memory/. [Accessed: ]
rf:citation
» Preventing Keras to allocate unnecessary GPU memory | Talles L | Sciencx | https://www.scien.cx/2024/08/19/preventing-keras-to-allocate-unnecessary-gpu-memory/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.