我尝试过关注TensorFlow:
import tensorflow as tf
a = tf.Variable(tf.zeros([10,1]))
b = tf.Variable(tf.zeros([10]) )
c = a + b
with tf.Session() as sess:
sess.run(tf.initialize_all_variables())
print sess.run(c)
我预计会有一个错误,例如“两个宣传者的排名必须相同”。但是,输出是10×10的零矩阵。为什么你认为这发生了?
答案 0 :(得分:3)
因为broadcasting。您有一个水平向量和一个垂直向量,一旦添加它们就会创建一个10x10矩阵。这同样适用于
@Override
protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
super.onActivityResult(requestCode, resultCode, data);
callbackManager.onActivityResult(requestCode, resultCode, data);
Log.d("onActivityResult", "result " + ShareDialog.canShow(ShareLinkContent.class));
}