paddlenlp/transformers/layoutxlm/visual_backbone.py
def _assert_strides_are_log2_contiguous(strides):
    """
    Assert that each stride is 2x times its preceding stride, i.e. "contiguous in log2".
    """
    for i, stride in enumerate(strides[1:], 1):
        assert stride == 2 * strides[
            i - 1], "Strides {} {} are not log2 contiguous".format(
                stride, strides[i - 1])

    Assert that each stride is 2x times its preceding stride, i.e. "contiguous in log2".
    
Assert that each stride is 2x times its preceding stride, i.e. "contiguous in log2".
Assert that each stride is 2x times its preceding stride i . e . " contiguous in log2 " .
def _assert_strides_are_log2_contiguous(strides):
    for i, stride in enumerate(strides[1:], 1):
        assert stride == 2 * strides[
            i - 1], "Strides {} {} are not log2 contiguous".format(
                stride, strides[i - 1])
def _assert_strides_are_log2_contiguous ( strides ) : for i , stride in enumerate ( strides [ 1 : ] , 1 ) : assert stride == 2 * strides [ i - 1 ] , "Strides {} {} are not log2 contiguous" . format ( stride , strides [ i - 1 ] )
Assert that each stride is 2x times its preceding stride, i.e.
Assert that each stride is 2x times its preceding stride i . e .
"""
    Assert that each stride is 2x times its preceding stride, i.e. "contiguous in log2".
    """
strides