def make_layer(basic_block, num_basic_block, **kwarg):
    """Make layers by stacking the same blocks.

    Args:
        basic_block (nn.module): nn.module class for basic block.
        num_basic_block (int): number of blocks.

    Returns:
        nn.Sequential: Stacked blocks in nn.Sequential.
    """
    layers = []
    for _ in range(num_basic_block):
        layers.append(basic_block(**kwarg))
    return nn.Sequential(*layers)
Make layers by stacking the same blocks.

Args:
basic_block (nn.module): nn.module class for basic block.
num_basic_block (int): number of blocks.

Returns:
nn.Sequential: Stacked blocks in nn.Sequential.
opensora/models/super_resolution/basicsr/archs/arch_util.py