All Projects → LuJunru → Sentences_pair_similarity_calculation_siamese_lstm

LuJunru / Sentences_pair_similarity_calculation_siamese_lstm

A Keras Implementation of Attention_based Siamese Manhattan LSTM

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sentences pair similarity calculation siamese lstm

Speech Transformer
A PyTorch implementation of Speech Transformer, an End-to-End ASR with Transformer network on Mandarin Chinese.
Stars: ✭ 565 (+1077.08%)
Mutual labels:  attention
Spatial Transformer Network
A Tensorflow implementation of Spatial Transformer Networks.
Stars: ✭ 794 (+1554.17%)
Mutual labels:  attention
Defactonlp
DeFactoNLP: An Automated Fact-checking System that uses Named Entity Recognition, TF-IDF vector comparison and Decomposable Attention models.
Stars: ✭ 30 (-37.5%)
Mutual labels:  attention
Simplecvreproduction
Reproduce simple cv project including attention module, classification, object detection, segmentation, keypoint detection, tracking 😄 etc.
Stars: ✭ 602 (+1154.17%)
Mutual labels:  attention
Nlp paper study
研读顶会论文,复现论文相关代码
Stars: ✭ 691 (+1339.58%)
Mutual labels:  attention
Cell Detr
Official and maintained implementation of the paper Attention-Based Transformers for Instance Segmentation of Cells in Microstructures [BIBM 2020].
Stars: ✭ 26 (-45.83%)
Mutual labels:  attention
Residual Attention Network
Residual Attention Network for Image Classification
Stars: ✭ 525 (+993.75%)
Mutual labels:  attention
Attentions
PyTorch implementation of some attentions for Deep Learning Researchers.
Stars: ✭ 39 (-18.75%)
Mutual labels:  attention
Tf Rnn Attention
Tensorflow implementation of attention mechanism for text classification tasks.
Stars: ✭ 735 (+1431.25%)
Mutual labels:  attention
Banglatranslator
Bangla Machine Translator
Stars: ✭ 21 (-56.25%)
Mutual labels:  attention
Vad
Voice activity detection (VAD) toolkit including DNN, bDNN, LSTM and ACAM based VAD. We also provide our directly recorded dataset.
Stars: ✭ 622 (+1195.83%)
Mutual labels:  attention
Text Classification
Implementation of papers for text classification task on DBpedia
Stars: ✭ 682 (+1320.83%)
Mutual labels:  attention
Nlp tensorflow project
Use tensorflow to achieve some NLP project, eg: classification chatbot ner attention QAetc.
Stars: ✭ 27 (-43.75%)
Mutual labels:  attention
Attention Is All You Need Pytorch
A PyTorch implementation of the Transformer model in "Attention is All You Need".
Stars: ✭ 6,070 (+12545.83%)
Mutual labels:  attention
Attentive Neural Processes
implementing "recurrent attentive neural processes" to forecast power usage (w. LSTM baseline, MCDropout)
Stars: ✭ 33 (-31.25%)
Mutual labels:  attention
Performer Pytorch
An implementation of Performer, a linear attention-based transformer, in Pytorch
Stars: ✭ 546 (+1037.5%)
Mutual labels:  attention
Pytorch Gat
My implementation of the original GAT paper (Veličković et al.). I've additionally included the playground.py file for visualizing the Cora dataset, GAT embeddings, an attention mechanism, and entropy histograms. I've supported both Cora (transductive) and PPI (inductive) examples!
Stars: ✭ 908 (+1791.67%)
Mutual labels:  attention
Biblosa Pytorch
Re-implementation of Bi-Directional Block Self-Attention for Fast and Memory-Efficient Sequence Modeling (T. Shen et al., ICLR 2018) on Pytorch.
Stars: ✭ 43 (-10.42%)
Mutual labels:  attention
Attentioncluster
TensorFlow Implementation of "Attention Clusters: Purely Attention Based Local Feature Integration for Video Classification"
Stars: ✭ 33 (-31.25%)
Mutual labels:  attention
Isab Pytorch
An implementation of (Induced) Set Attention Block, from the Set Transformers paper
Stars: ✭ 21 (-56.25%)
Mutual labels:  attention

孪生LSTM网络(Siamese-LSTM)

本项目是基于孪生LSTM网络+注意力机制+曼哈顿距离(Manhattan distance)实现的句对相似度计算。
中文训练数据为蚂蚁金服句对数据,约4万组,正负样本比例1:3.6;英文训练数据来自Kaggle上的Quora句对数据,约40万组,正负样本比例1:1.7。新增一组翻译数据:使用Google Translator将Quora数据翻译成中文。

资料

使用

训练

$ python3 train.py
$ type cn for Chinese Data or en for English Data

验证

$ python3 predict.py
$ type cn for Chinese Data or en for English Data

预测

$ python3 score.py
$ type cn for Chinese Data or en for English Data

效果

$ 根据数据比例来看,中文训练集的基准准确率应为0.783,英文与翻译数据为0.630
$ =================================================================================================
$ 中文 数据实际训练 5 轮时的效果:使用随机词向量时,训练集十折交叉0.778;使用CN120G词向量时,训练集十折交叉0.789
$ 英文 数据实际训练 5 轮时的效果:使用随机词向量时,训练集十折交叉0.774;使用Google词向量时,训练集十折交叉0.771
$ 翻译 数据实际训练 5 轮时的效果:使用随机词向量时,训练集十折交叉0.755;使用CN120G词向量时,训练集十折交叉0.756
$ =================================================================================================
$ 中文 数据实际训练 8 轮时的效果:使用随机词向量时,训练集十折交叉0.777;使用CN120G词向量时,训练集十折交叉0.787
$ 英文 数据实际训练 8 轮时的效果:使用随机词向量时,训练集十折交叉0.774;使用Google词向量时,训练集十折交叉0.778
$ 翻译 数据实际训练 8 轮时的效果:使用随机词向量时,训练集十折交叉0.786;使用CN120G词向量时,训练集十折交叉0.786
$ =================================================================================================
$ 总结:1.有无预训练词向量几乎不影响结果;2.中文数据上训练几乎没有效果,和英文形成鲜明对比--这可能是因为蚂蚁金服数据间太相似了或者数据量太小,翻译数据集上的实验证明了这一点。
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].