(op)
| 347 | |
| 348 | |
| 349 | def 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 | |
| 363 | if __name__ == '__main__': |
| 364 | if len(sys.argv) == 2: |
no test coverage detected