/MemNN

Implementation of Memory Network in pyTorch

Primary LanguagePython

Implementation of Memory Network in pyTorch

This repo including implementations of End-to-End Memory Network and Key-Value Memory Network

Dataset used here is WikiMovie. Note that the preprocessing scripts are borrowed from original repo

Code (mainly in pytorch)

  • config.py: some global configurations for data dir and training detail
  • gen_dict.py: generate dict
  • data_loader.py: load preprocessed data
  • model.py: model for training similarities and readers
  • train_*.py: training script for experimental model
  • plot.py: plot the graph for report

Run

  • run setup_processed_data.sh to get the processed data
  • run gen_dict.py to generate the dictionary file
  • run gen_sim_data.py to generate the data for training similarity function
  • run the train_mlp.py to train the similarity function
  • run gen_reader_data.py to generate the data for reader
  • run train_lstm.py, train_memory_network.py, train_kv_mm.py to train the corresponding model