嗨,我想重塑一个层后,密集层,但它返回有趣的错误。这里是代码
codings_size=10
decoder_inputs = tf.keras.layers.Input(shape=[codings_size])
# x=tf.keras.layers.Flatten(decoder_inputs)
x=tf.keras.layers.Dense(3 * 3 * 16)(decoder_inputs),
x=tf.keras.layers.Reshape((3, 3, 16))(x),
这里是错误
AttributeError: Exception encountered when calling layer "reshape_28" (type Reshape).
'tuple' object has no attribute 'shape'
Call arguments received by layer "reshape_28" (type Reshape):
• inputs=('tf.Tensor(shape=(None, 144), dtype=float32)',)
1条答案
按热度按时间kcrjzv8t1#
错误是你加了额外的逗号。只要删除它们。像这样: