Load model from filename.
771324
def load(cls, filename):
        

        instance = Glove()

        with open(filename, 'rb') as savefile:
            instance.__dict__ = pickle.load(savefile)

        return instance
539583
def get_model_path(self, name):
        """"""

        name, ext = os.path.splitext(name)
        ext = '.xml'
        xmlfile = name + self.config['file_suffix'] + ext
        xmlfile = utils.resolve_path(xmlfile,
                                     workdir=self.config['fileio']['workdir'])

        return xmlfile
1086371
def load_sources(self, sources):
        """"""

        self.clear()
        for s in sources:

            if isinstance(s, dict):
                s = Model.create_from_dict(s)

            self.load_source(s, build_index=False)
        self._build_src_index()
1324303
def load(filename):
        """""""
        if os.path.isfile(filename):
            with open(filename) as handle:
                return yaml_load(handle, Loader=Loader)  # nosec
        raise RuntimeError("File %s doesn't exist!" % filename)
557977
def get_model_from_key(key):
    """"""
    _known_models = {}
    model_name = key.split(':', 2)[0]
    # populate
    for klass in Model.__subclasses__():
        _known_models[klass.__name__] = klass
    return _known_models.get(model_name, None)
825608
def loadfile(self, filename, mode='replace', **options):
        """"""
        self.command('loadfile', filename.encode(fs_enc), mode, MPV._encode_options(options))
1231911
def load_parameters(self, filename, ctx=mx.cpu()): # pylint: disable=arguments-differ
        
        self.lm_model.load_parameters(filename, ctx=ctx)
913118
def load_model_from_package(name, **overrides):
    """"""
    cls = importlib.import_module(name)
    return cls.load(**overrides)
336739
def load(self, model):
        """"""
        self.perceptron.weights, self.tagdict, self.classes, self.clusters = load_model(model)
        self.perceptron.classes = self.classes
14027
def load_model(path):
    """"""
    abspath = find_data(path)
    cached = _model_cache.get(abspath)
    if cached is not None:
        log.debug('Using cached copy of %s' % path)
        return cached
    log.debug('Loading model %s' % path)
    try:
        with io.open(abspath, 'rb') as f:
            model = six.moves.cPickle.load(f)
    except IOError:
        raise ModelNotFoundError('Could not load %s. Have you run `cde data download`?' % path)
    _model_cache[abspath] = model
    return model
1109395
def _load_from_file(self, filename):
        """"""
        if filename in self.fdata:
            return self.fdata[filename]
        else:
            filepath = find_in_tarball(self.tarloc, filename)
            return read_from_tarball(self.tarloc, filepath)
539413
def load_model(file)
      begin
        require_dependency(file)
      rescue Exception => e
        Logger.new($stdout).warn(e.message)
      end
    end
1215487
def load(self, modelfile, layer=None):
        
        # read modelfile, convert JSON and load/update model
        self.param_file = modelfile
        self._load(layer)
        self._update(layer)
909508
def get_model(app, model):
    """"""
    if 'get_model' not in _LAZY_LOADS:
        _lazy_load_get_model()

    _get_model = _LAZY_LOADS['get_model']
    return _get_model(app, model)
1284340
def load_object(self, filename):
        

        """
        p = Path(filename)
        with open(p, 'rb') as f:
            d = pickle.load(f)
        obj = self._new_object(objtype=p.suffix.strip('.'),
                               name=p.name.split('.')[0])
        obj.update(d)
948919
def svm_load_model(model_file_name):
	
	model = libsvm.svm_load_model(model_file_name.encode())
	if not model:
		print("can't open model file %s" % model_file_name)
		return None
	model = toPyModel(model)
	return model
232299
def get_model_loader(filename):
    
    assert isinstance(filename, six.string_types), filename
    filename = os.path.expanduser(filename)
    if filename.endswith('.npy'):
        assert tf.gfile.Exists(filename), filename
        return DictRestore(np.load(filename, encoding='latin1').item())
    elif filename.endswith('.npz'):
        assert tf.gfile.Exists(filename), filename
        obj = np.load(filename)
        return DictRestore(dict(obj))
    else:
        return SaverRestore(filename)