Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
themeMidnight
titleRestrict use of GPU memory
linenumberstrue
from tensorflow import keras
import tensorflow as tf
 
config = tf.ConfigProto()
 
config.gpu_options.allow_growth=True						# This line is important so you don't occupy more memory than necessary.
config.gpu_options.per_process_gpu_memory_fraction = 0.1	# This line gives the absolute maximum percentage (%) of the total GPU memory you allow yourself to use.
# By combining those two lines, you can restrict how much memory you maximum will use, and also 
 
keras.backend.set_session(tf.Session(config=config))
 
 

 

 

 

info
Info

 Please feel free to share your skills and knowledge if you think some of it could be nice to include in this wiki. To contribute you can send an email to: joakim.g.antonsen@ntnu.no 

Content by Label
showLabelsfalse
max5
spacesailab
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "docker" and type = "page" and space = "ailab"
labelsdocker

...