if len(args) > 5:
raise TypeError("Layer can receive at most 4 positional arguments.")
if len(args) == 5:
if isinstance(args[2], int) and isinstance(args[3], int) and isinstance(args[4], int):
kernel_size = (args[2], args[3], args[4])
args = [args[0], args[1], kernel_size]
converted.append(("kernel_size", "kernel_dim*"))
After Change
args = [args[0], args[1], kernel_size]
converted.append(("kernel_size", "kernel_dim*"))
elif len(args) == 3:
if all([x in kwargs for x in ["kernel_dim2", "kernel_dim3"]]):
kernel_size = (args[2],
kwargs.pop("kernel_dim2"),
kwargs.pop("kernel_dim3"))