TypeError: float() argument must be a string or a number, not ‘Dimension‘

    技术2024-07-27  75

    出错代码

    tf.convert_to_tensor(inputs.shape[0], dtype=tf.float32)

    解决方法

    tf.convert_to_tensor(inputs.shape[0].value, dtype=tf.float32)
    Processed: 0.010, SQL: 9