如果你是用的GPU版本的Tensorflow,你可以这样来使用CPU版本的Tensorlfow:config = tf.ConfigProto( device_count = {'GPU': 0} )sess = tf.Session(config=config) 黄世宇/Shiyu Huang's Personal Page:https://huangshiyu13.github.io/