def ConvBlock(kernel_size,
              in_channels,
              out_channels,
              stride=1,
              pad_type='reflect',
              dropout=None,
              norm='none',
              acti='lrelu',
              acti_first=False,
              use_bias=True,
              inplace=True):
    """
    returns a list of [pad, conv, norm, acti] or [acti, pad, conv, norm]
    """

    layers = ConvLayers(kernel_size,
                        in_channels,
                        out_channels,
                        stride=stride,
                        pad_type=pad_type,
                        use_bias=use_bias)
    layers += get_dropout_layer(dropout)
    layers += get_norm_layer(norm, norm_dim=out_channels)
    acti_layers = get_acti_layer(acti, inplace=inplace)

    if acti_first:
        return acti_layers + layers
    else:
        return layers + acti_layers

    returns a list of [pad, conv, norm, acti] or [acti, pad, conv, norm]
    
mGPT/models/utils/blocks.py