Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
shaunbys 163424bd7c | 1 year ago | |
---|---|---|
.. | ||
AttentionVisual.py | 1 year ago | |
COMMIT_EDITMSG | 1 year ago | |
README.md | 1 year ago | |
attentionviz.py | 1 year ago | |
config | 1 year ago | |
environment.yml | 1 year ago | |
optim.py | 1 year ago | |
requirements.txt | 1 year ago | |
train.py | 1 year ago | |
utils.py | 1 year ago |
This is the implementation of Causformers in Pytorch.
pip install -r requirements.txt,
PyTorch, torchtext
This contains 9 python files.
requirements.txt
: The necessary tools to run this codeAttentionVisual.py
: Functions to visualize the attention as heat-maps or bipartite graphsdatasets/
: Tool set to load the original datasets with torchtextoptim.py
: A custom optimizer (BertAdam class) adopted from Hugging Face's codetrain.py
: A helper class for training and evaluationutils.py
: Several utility functionscatear/
: The implementation of CATEAR-enforced Transformers.data/
: The file of original datasets.vector_cache/
: The file stores GloVe-300d word embeddings and preprocessed datasetsDownload original datasets .data.zip and unzip in .data/.
The CATEAR optimization is defined in the ./catear/Modelus.py line 38 - 52
The two-layer GCN updater is defined in the ./catear/gcn_layer and ./catear/Modelud.py line 35
基于预训练模型和图神经网络的NLP任务。
Unity3D Asset Python Text
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》