'Load parameters from file.
filename : str
Path to parameter file.
ctx : Context or list of Context
Context(s) initialize loaded parameters on.
allow_missing : bool, default False
Whether to silently skip loading parameters not represents in the file.
ignore_extra : bool, default False
Whether to silently ignore parameters from the file that are not
present in this ParameterDict.
restore_prefix : str, default \'\'
prepend prefix to names of stored parameters before loading.'

def load(self, filename, ctx, allow_missing=False, ignore_extra=False, restore_prefix=''):

    if restore_prefix:
        for name in self.keys():
            assert name.startswith(restore_prefix), ('restore_prefix    is    %s    but    Parameters    name    %s    does    not    start    with    %s' % (restore_prefix, name, restore_prefix))
    lprefix = len(restore_prefix)
    arg_dict = {(restore_prefix + k): v for (k, v) in ndarray.load(filename).items()}
    if (not allow_missing):
        for name in self.keys():
            assert (name in arg_dict), ('Parameter    %s    is    missing    in    file    %s' % (name[lprefix:], filename))
    for name in arg_dict:
        if (name not in self._params):
            assert ignore_extra, ('Parameter    %s    loaded    from    file    %s    is    not    present    in    ParameterDict' % (name[lprefix:], filename))
            continue
        self[name]._load_init(arg_dict[name], ctx)
