- An end-to-end convolutional implementation, suitable for document-level generative summarization (though it performs better in translation tasks).
- CNN Encoder
- CNN Decoder
- Multi-step Attention
- Dilation
- Log all outputs to Visdom
- Transform CNN to fully connected in Decoder during inference
- Adaptive Softmax
- Efficient memory usage with fp-16
- Expand to other tasks
- Python 3.7
- Ubuntu 16.04
- PyTorch 1.0
- Visdom
- Note: Configure FastText for pretrained embeddings if needed.
- Create a
data
folder and download the CNNDM dataset.
- Run
preprocess.ipynb
- See
parameters.py
python train.py
python infer.py
data_presentation.ipynb
: Dataset statisticsmake_pretrained_embedding.ipynb
: Builds embedding matrix from FastText pretrained embeddingspreprocess.ipynb
: Preprocessing for the CNNDM datasettensor_test.ipynb
: Additional tests
conv_seq2seq.py
: End-to-end convolutional model, including encoder and decoder classesdeprecated_code.py
: Deprecated codeinfer.py
: Model inferencelayers.py
: Custom weight-initialized fully connected, convolutional, and masked temporal convolutional layersloss.py
: Cross-entropy loss calculation for each time step in the decoder sequence, with maskingparamcount.py
: Model parameter countparameters.py
: Model hyperparameterstrain.py
: Model trainingvisualization.py
: Model computation graph visualization
model_check
: Monitors training progress, logs, recorded losses, and training outputsmodel_graph
: Backpropagation computation graph visualizationssave_model
: Saved model filesmodel_output
,system_output
: Outputs for ROUGE evaluation of summarization