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


# Auto format padding
dataset/ETHPy150Open tflearn/tflearn/tflearn/utils.py/autoformat_filter_conv2d/swapped operands of `in`