MCPcopy Create free account
hub / github.com/chinawithfrank/ChatBotCourse / main

Function main

chatbotv3/encoder_decoder_seq2seq.py:349–361  ·  view source on GitHub ↗
(op)

Source from the content-addressed store, hash-verified

347
348
349def main(op):
350 np.set_printoptions(threshold='nan')
351 lstm = MyLSTM()
352 lstm.load_word_vectors()
353 lstm.load_one_hot_word_vectors()
354 if op == 'train':
355 lstm.train()
356 elif op == 'predict':
357 lstm.predict()
358 elif op == 'test':
359 lstm.test()
360 else:
361 print 'Usage:'
362
363if __name__ == '__main__':
364 if len(sys.argv) == 2:

Callers 1

Calls 6

load_word_vectorsMethod · 0.95
trainMethod · 0.95
predictMethod · 0.95
testMethod · 0.95
MyLSTMClass · 0.85

Tested by

no test coverage detected