add U-GAT-IT

This commit is contained in:
2020-08-21 16:14:30 +08:00
parent 323bf2f6ab
commit 1a1cb9b00f
18 changed files with 815 additions and 55 deletions

View File

@@ -67,7 +67,11 @@ class _Registry:
if default_args is not None:
for name, value in default_args.items():
args.setdefault(name, value)
return obj_cls(**args)
try:
obj = obj_cls(**args)
except TypeError as e:
raise TypeError(f"invalid argument in {args} when try to build {obj_cls}\n") from e
return obj
class ModuleRegistry(_Registry):