[問題] tensorflow的session問題

作者: sheman (夜露死苦)   2020-10-05 20:54:56
想請教版上大大
小弟在Anaconda的環境下使用tensorflow 1.15版
只是簡單先跑個程式,程式碼如下:
import tensorflow as tf
x = tf.constant([[1, 2],[3, 4]], name='x')
y = tf.constant([[5, 6],[7, 8]], name='y')
with tf.Session() as sess:
print("y: {}\n".format(sess.run(y)))
沒想到出現以下的錯誤訊息:
InternalError Traceback (most recent call last)
<ipython-input-5-abbc1cf59ac4> in <module>
10 # tf_neg = -x
11
作者: yiche (你若安好,便是晴天)   2020-10-05 23:49:00
你裝的是gpu版本的TensorFlow嗎?
作者: s59654655 (s596546ff)   2020-10-06 00:00:00
仔細看錯誤提示!找不到gpu,安裝cpu版本吧
作者: pmove (金疾檸檬)   2020-10-06 17:17:00
想辦法建個GPU環境再跑吧?
作者: sheman (夜露死苦)   2020-10-06 21:52:00
感謝大大建議,問題解決了!!

Links booklink

Contact Us: admin [ a t ] ucptt.com