- 投稿日:2021-03-01T11:26:17+09:00
TensorFlow(Keras) 2.xでCPUで計算するときの方法
1系の場合では、
config = tf.ConfigProto(device_count = {'GPU': 0})ですが、2系では
tf.config.set_visible_devices([], 'GPU')と記載することでCPUモードで使用できます。
1系の場合では、
config = tf.ConfigProto(device_count = {'GPU': 0})ですが、2系では
tf.config.set_visible_devices([], 'GPU')と記載することでCPUモードで使用できます。