x = np.arange(0.0, 50.0, 2.0) y = x ** 1.3 + np.random.rand(*x.shape) * 30.0 s = np.random.rand(*x.shape) * 800 + 500 plt.scatter(x, y, s, c="g", alpha=0.5, marker=r'$\clubsuit$', label="Luck") plt.xlabel("Lepr
tensorflow关于打印Tensor对象的具体值(python)tensorflow关于打印Tensor对象的具体值(python)import tensorflow as tf x = tf.Variable(3, name='x')y = x * 5 print(y)这个时候输出的是: Tensor("mul:0", shape=(), dtype=int32) ,并不是预料中的15,那么怎么输出15呢?如下:import tensorflow as...
print(y) 这个时候输出的是: Tensor("mul:0", shape=(), dtype=int32) ,并不是预料中的15,那么怎么输出15呢?如下: import tensorflow as tf import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' x = tf.Variable(3, name='x') y = x * 5 sess = tf.InteractiveSession() sess.run(tf.g...