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

Function load_model

nlp_class2/word2vec_theano.py:317–323  ·  view source on GitHub ↗
(savedir)

Source from the content-addressed store, hash-verified

315
316
317def load_model(savedir):
318 with open('%s/word2idx.json' % savedir) as f:
319 word2idx = json.load(f)
320 npz = np.load('%s/weights.npz' % savedir)
321 W = npz['arr_0']
322 V = npz['arr_1']
323 return word2idx, W, V
324
325
326

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected