INNER CODE UNIT · Python
build_network
piddnad/DDColor · basicsr/archs/__init__.py:35
def build_network(opt):
_ensure_arch_modules_imported()
opt = deepcopy(opt)
network_type = opt.pop('type')
net = ARCH_REGISTRY.get(network_type)(**opt)
logging.getLogger('basicsr').info(f'Network [{net.__class__.__name__}] is created.')
return net