tensorflow中的DataFormatVecPermute()算子的四個引數如何設定,我寫的代碼如下:
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
a = tf.constant([1, 2, 3, 4], name='a')
sess = tf.compat.v1.Session()
print(sess.run(a))
y = tf.raw_ops.DataFormatVecPermute(a, 'NHWC', 'NCHW', name='None')
print(y)
產生的錯誤如下:
TypeError: DataFormatVecPermute only takes keyword args (possible keys: ['x', 'src_format', 'dst_format', 'name']). Please pass these args as kwargs instead.
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/283570.html
上一篇:畫筆工具
