x.numpy() array([[1, 1, 1], [1, 1, 1]], dtype=int32) >>> # sum all the elements >>> # 1 + 1 + 1 + 1 + 1+ 1 = 6 >>> tf.reduce_sum(x).numpy()
確定! 回上一頁