pudae / tensorflow-densenet

Tensorflow-DenseNet with ImageNet Pretrained Models
Apache License 2.0
169 stars 59 forks source link

how to set the usage of gpu #23

Open lxztju opened 5 years ago

lxztju commented 5 years ago

In tensorflow, we could use these commends to set the usage of gpu config = tf.ConfigProto() config.gpu_options.per_process_gpu_memory_fraction = 0.9 # 占用GPU90%的显存 session = tf.Session(config=config) If I use the package of slim, how to set the usage of gpu?