tf.contrib.layers.repeat( inputs, repetitions, layer, *args, **kwargs )
Applies the same layer with the same arguments repeatedly.
y = repeat(x, 3, conv2d, 64, [3, 3], scope='conv1') # It is equivalent to: x = conv2d(x, 64, [3, 3], scope='conv1/conv1_1') x = conv2d(x, 64, [3, 3], scope='conv1/conv1_2') y = conv2d(x, 64, [3, 3], scope='conv1/conv1_3')
scope argument is not given in
kwargs, it is set to
functools.partial objects). If neither
func.__name__ is available, the layers are called with
Tensorsuitable for layer.
repetitions: Int, number of repetitions.
layer: A layer with arguments
(inputs, *args, **kwargs)
*args: Extra args for the layer.
**kwargs: Extra kwargs for the layer.
A tensor result of applying the layer, repetitions times.
ValueError: If the op is unknown or wrong.
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.