w = tf.Variable( tf.random_uniform([2, 2]), name="w") y = tf.matmul(x, w) y = tf.identity(y, name="y") output = tf.nn.softmax(y) # with tf.Session() as sess: inputs = np.array( [[37.0, -23.0], [1.0, 4.0]]) print(sess.run(output, {x: inputs})) # => [[1.7769547e-16 1.0000000e+00] # [4.6664253e-01 5.3335750e-01]] 8 . 9