Error:SyntaxError: non-default argument follows default argument
报错内容:
File "E:/gyx/7_10_rank/util/data/market1501_1.py", line 21
def __init__(self, root='E:/gyx/',dtype, **kwargs):
^
SyntaxError: non-default argument follows default argument
语法错误:非默认参数跟随默认参数==>意思就是将没有默认值的参数放在有默认值的参数的后面
将下面内容进行修改:
def __init__(self, root='E:/gyx/',dtype, **kwargs):
修改为:
def __init__(self,dtype,root='E:/gyx/'):