with tf.Session() as sess: ? ? with tf.device("/gpu:0"): ? ? ? ? ................. a是一個tensor,如果要輸出a的值,則print(a.eval())