def autoformat_kernel_2d(strides):
    if type(strides) is int:
        return [1, strides, strides, 1]
    elif type(strides) in [tuple, list]:
        if len(strides) == 2:
            return [1, strides[0], strides[1], 1]
        elif len(strides) == 4:
            return [strides[0], strides[1], strides[2], strides[3]]
        else:
            if [tuple, list] in type(strides):
                raise Exception("strides length error: " + str(len(strides))
                                + ", only a length of 2 or 4 is supported.")
            else:
                raise Exception("strides format error: " + str(type(strides)))


# Auto format filter size
# Output shape: (rows, cols, input_depth, out_depth)
dataset/ETHPy150Open tflearn/tflearn/tflearn/utils.py/autoformat_kernel_2d/swapped operands of `in`