目录
render报错 'GroupParams' object has no attribute 'source_path'
Could not recognize scene type 报错代码:
AttributeError: 'Namespace' object has no attribute 'model_path'
'GroupParams' object has no attribute 'data_device'
render报错 'GroupParams' object has no attribute 'source_path'
原因:
class ParamGroup:
def __init__(self, parser: ArgumentParser, name : str, fill_none = False):
group = parser.add_argument_group(name)
for key, value in vars(self).items():
shorthand = False
if key.startswith("_"):
shorthand = True
key = key[1:]
t = type(value)
value = value if not fill_none else None
fill_none 设置为了true,所有的默认参数置空了
解决方法,注释掉代码:
value = value if not fill_none else None