當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python tf.compat.v1.Dimension.__add__用法及代碼示例

用法

__add__(
    other
)

參數

  • other 另一個維度,或 as_dimension 接受的值。

返回

  • 一個維度,其值為 selfother 之和。

返回 selfother 的總和。

尺寸匯總如下:

tf.compat.v1.Dimension(m)    + tf.compat.v1.Dimension(n)     ==
tf.compat.v1.Dimension(m + n)
tf.compat.v1.Dimension(m)    + tf.compat.v1.Dimension(None)  # equiv. to
tf.compat.v1.Dimension(None)
tf.compat.v1.Dimension(None) + tf.compat.v1.Dimension(n)     # equiv. to
tf.compat.v1.Dimension(None)
tf.compat.v1.Dimension(None) + tf.compat.v1.Dimension(None)  # equiv. to
tf.compat.v1.Dimension(None)

相關用法


注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.compat.v1.Dimension.__add__。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。