MCPcopy Create free account
hub / github.com/OpenGVLab/DragGAN / construct_class_by_name

Function construct_class_by_name

draggan/stylegan2/dnnlib/util.py:287–289  ·  view source on GitHub ↗

Finds the python class with the given name and constructs it with the given arguments.

(*args, class_name: str = None, **kwargs)

Source from the content-addressed store, hash-verified

285
286
287def construct_class_by_name(*args, class_name: str = None, **kwargs) -> Any:
288 """Finds the python class with the given name and constructs it with the given arguments."""
289 return call_func_by_name(*args, func_name=class_name, **kwargs)
290
291
292def get_module_dir_by_obj_name(obj_name: str) -> str:

Callers

nothing calls this directly

Calls 1

call_func_by_nameFunction · 0.85

Tested by

no test coverage detected