您的位置:首页 > 其它

TensorFlow 学习:tensor.get_shape() 与 tf.shape(a)

2018-03-05 16:18 477 查看

TensorFlow 学习:tensor.get_shape() 与 tf.shape(a)

两者相同在于都能得到一个tensor的shape。

不同点:

1.使用对象:get_shape()只能是tensor作为使用对象,shape()的对象a可以是tensor, list, array

2.返回值:get_shape()返回一个tuple,shape()返回一个tensor
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  TensorFlow