tf.keras.layers.RepeatVector  |  TensorFlow v2.0.0 (original) (raw)

tf.keras.layers.RepeatVector

Stay organized with collections Save and categorize content based on your preferences.

Repeats the input n times.

Inherits From: Layer

View aliases

Compat aliases for migration

SeeMigration guide for more details.

tf.compat.v1.keras.layers.RepeatVector

tf.keras.layers.RepeatVector(
    n, **kwargs
)

Example:

model = Sequential()
model.add(Dense(32, input_dim=32))
# now: model.output_shape == (None, 32)
# note: `None` is the batch dimension

model.add(RepeatVector(3))
# now: model.output_shape == (None, 3, 32)
Arguments
n Integer, repetition factor.

Input shape:

2D tensor of shape (num_samples, features).

Output shape:

3D tensor of shape (num_samples, n, features).

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2020-10-01 UTC.