Ich möchte die GPU-Beschränkung wie in this topic angewiesen.wie zu implementieren Tensorflow Sitzung Konfiguration
Aber mein Code sieht wie folgt aus:
deep_grap = tf.Graph()
with deep_grap.as_default():
### graph definition here
### graph definition here
with tf.Session(graph=deep_grap) as sess:
tf.initialize_all_variables().run()
### more computations here
In diesem Fall, wie stelle ich die Konfiguration in meinem Code? Ich habe keine direkte sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
Linie hier. Vielen Dank!