tf.keras.layers.Reshape

介绍

该层可以改变形状

初始化

__init__(
    target_shape,
    **kwargs
)

例子

例子1:

model = Sequential()
model.add(Reshape((3, 4), input_shape=(12,)))

例子2:

output = Reshape((16,16,5,7))(x)