Tensorflow 打印 Tensor 的值
话不多说,直接上例子:import tensorflow as tfsess = tf.InteractiveSession()all_act_prob= [0.4, 0.6]n_actions = 2tf_acts = [0,1]print(tf.one_hot(tf_acts, n_actions).eval())print(tf.log(all_act_prob).eval())print((-tf.log(all_act_prob)*tf.one_hot(tf_acts, n_a