neupy.layers.repeat

neupy.layers.repeat(network_or_layer, n)[source]

Function copies input n - 1 times and connects everything in sequential order.

Parameters:
network_or_layer : network or layer

Layer or network (connection of layers).

n : int

Number of times input should be replicated.

Examples

>>> from neupy.layers import *
>>>
>>> block = Conv((3, 3, 32)) >> Relu() >> BN()
>>> block
<unknown> -> [... 3 layers ...] -> (?, ?, ?, 32)
>>>
>>> repeat(block, n=5)
<unknown> -> [... 15 layers ...] -> (?, ?, ?, 32)