basicsr/utils/options.py
def dict2object(dic):
    """
       [Lotayou] 20210426: HiFaceGAN compatible helper function
       Convert a dict (read from yaml) to an object class
       to call an element with opt.xxx instead of opt['xxx']

    """
    opt = Options()   # Use built-in Python object
    for k, v in dic.items():
        if isinstance(v, dict):
            opt.__dict__[k] = dict2objectclass(v)
        else:
            opt.__dict__[k] = v
    return opt

       [Lotayou] 20210426: HiFaceGAN compatible helper function
       Convert a dict (read from yaml) to an object class
       to call an element with opt.xxx instead of opt['xxx']

    
[Lotayou] 20210426: HiFaceGAN compatible helper function
Convert a dict (read from yaml) to an object class
to call an element with opt.xxx instead of opt['xxx']
[ Lotayou ] 20210426 : HiFaceGAN compatible helper function Convert a dict ( read from yaml ) to an object class to call an element with opt . xxx instead of opt [ ' xxx ' ]
def dict2object(dic):
    opt = Options()   
    for k, v in dic.items():
        if isinstance(v, dict):
            opt.__dict__[k] = dict2objectclass(v)
        else:
            opt.__dict__[k] = v
    return opt
def dict2object ( dic ) : opt = Options ( ) for k , v in dic . items ( ) : if isinstance ( v , dict ) : opt . __dict__ [ k ] = dict2objectclass ( v ) else : opt . __dict__ [ k ] = v return opt
[Lotayou] 20210426: HiFaceGAN compatible helper function
Convert a dict (read from yaml) to an object class
to call an element with opt.xxx instead of opt['xxx']
[ Lotayou ] 20210426 : HiFaceGAN compatible helper function Convert a dict ( read from yaml ) to an object class to call an element with opt . xxx instead of opt [ ' xxx ' ]
"""
       [Lotayou] 20210426: HiFaceGAN compatible helper function
       Convert a dict (read from yaml) to an object class
       to call an element with opt.xxx instead of opt['xxx']

    """ # Use built-in Python object
dic