2
在tf.einsum
中可以使用多於26個小寫字母作爲索引嗎?在tf.einsum中使用超過26個索引?
Numpy還允許使用大寫字母,即np.einsum('zA,AB->zB',M1,M2)
而tf.einsum
會返回錯誤。
這對收縮張量網絡非常有用。
在tf.einsum
中可以使用多於26個小寫字母作爲索引嗎?在tf.einsum中使用超過26個索引?
Numpy還允許使用大寫字母,即np.einsum('zA,AB->zB',M1,M2)
而tf.einsum
會返回錯誤。
這對收縮張量網絡非常有用。
這目前不可能。
TensorFlow驗證傳遞給einsum
using the following regular expression公式:
match = re.match('([a-z,]+)(->[a-z]*)?', equation)
if not match:
raise ValueError(
'Indices have incorrect format: %s' % equation
)
任何字符不在類[a-z]
會導致引發錯誤的功能。由於TensorFlow的einsum
函數不支持橢圓...
,且所有軸必須明確標記,因此只能使用26維或更小的張量。