MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / load_model

Function load_model

nlp_class2/word2vec.py:266–272  ·  view source on GitHub ↗
(savedir)

Source from the content-addressed store, hash-verified

264
265
266def load_model(savedir):
267 with open('%s/word2idx.json' % savedir) as f:
268 word2idx = json.load(f)
269 npz = np.load('%s/weights.npz' % savedir)
270 W = npz['arr_0']
271 V = npz['arr_1']
272 return word2idx, W, V
273
274
275

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected