All Projects → lsrock1 → abcnn_pytorch

lsrock1 / abcnn_pytorch

Licence: other
Implementation of ABCNN(Attention-Based Convolutional Neural Network) on Pytorch

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to abcnn pytorch

CHIP2018
CHIP2018问句匹配大赛 Rank6解决方案
Stars: ✭ 20 (-42.86%)
Mutual labels:  sentence-similarity
long-short-transformer
Implementation of Long-Short Transformer, combining local and global inductive biases for attention over long sequences, in Pytorch
Stars: ✭ 103 (+194.29%)
Mutual labels:  attention-mechanism
hamnet
PyTorch implementation of AAAI 2021 paper: A Hybrid Attention Mechanism for Weakly-Supervised Temporal Action Localization
Stars: ✭ 30 (-14.29%)
Mutual labels:  attention-mechanism
Attention mechanism-event-extraction
Attention mechanism in CNNs to extract events of interest
Stars: ✭ 17 (-51.43%)
Mutual labels:  attention-mechanism
resolutions-2019
A list of data mining and machine learning papers that I implemented in 2019.
Stars: ✭ 19 (-45.71%)
Mutual labels:  attention-mechanism
Multi-task-Conditional-Attention-Networks
A prototype version of our submitted paper: Conversion Prediction Using Multi-task Conditional Attention Networks to Support the Creation of Effective Ad Creatives.
Stars: ✭ 21 (-40%)
Mutual labels:  attention-mechanism
NLP-paper
🎨 🎨NLP 自然语言处理教程 🎨🎨 https://dataxujing.github.io/NLP-paper/
Stars: ✭ 23 (-34.29%)
Mutual labels:  attention-mechanism
AttentionGatedVNet3D
Attention Gated VNet3D Model for KiTS19——2019 Kidney Tumor Segmentation Challenge
Stars: ✭ 35 (+0%)
Mutual labels:  attention-mechanism
SentenceSimilarity
The enhanced RCNN model used for sentence similarity classification
Stars: ✭ 41 (+17.14%)
Mutual labels:  sentence-similarity
datastories-semeval2017-task6
Deep-learning model presented in "DataStories at SemEval-2017 Task 6: Siamese LSTM with Attention for Humorous Text Comparison".
Stars: ✭ 20 (-42.86%)
Mutual labels:  attention-mechanism
Linear-Attention-Mechanism
Attention mechanism
Stars: ✭ 27 (-22.86%)
Mutual labels:  attention-mechanism
visdial
Visual Dialog: Light-weight Transformer for Many Inputs (ECCV 2020)
Stars: ✭ 27 (-22.86%)
Mutual labels:  attention-mechanism
dodrio
Exploring attention weights in transformer-based models with linguistic knowledge.
Stars: ✭ 233 (+565.71%)
Mutual labels:  attention-mechanism
Hierarchical-Word-Sense-Disambiguation-using-WordNet-Senses
Word Sense Disambiguation using Word Specific models, All word models and Hierarchical models in Tensorflow
Stars: ✭ 33 (-5.71%)
Mutual labels:  attention-mechanism
minimal-nmt
A minimal nmt example to serve as an seq2seq+attention reference.
Stars: ✭ 36 (+2.86%)
Mutual labels:  attention-mechanism
MP-CNN-Variants
Variants of Multi-Perspective Convolutional Neural Networks
Stars: ✭ 22 (-37.14%)
Mutual labels:  sentence-similarity
stanford-cs231n-assignments-2020
This repository contains my solutions to the assignments for Stanford's CS231n "Convolutional Neural Networks for Visual Recognition" (Spring 2020).
Stars: ✭ 84 (+140%)
Mutual labels:  attention-mechanism
A-Persona-Based-Neural-Conversation-Model
No description or website provided.
Stars: ✭ 22 (-37.14%)
Mutual labels:  attention-mechanism
extkeras
Playground for implementing custom layers and other components compatible with keras, with the purpose to learn the framework better and perhaps in future offer some utils for others.
Stars: ✭ 18 (-48.57%)
Mutual labels:  attention-mechanism
LMFD-PAD
Learnable Multi-level Frequency Decomposition and Hierarchical Attention Mechanism for Generalized Face Presentation Attack Detection
Stars: ✭ 27 (-22.86%)
Mutual labels:  attention-mechanism

ABCNN_pytorch

Attention-Based Convolutional Neural Network for Modeling Sentence Pairs

Usage

  • Need Data and Dataloader for that data
  • Clone the repository.
  • Run pip3 install -r requirements.txt to install project dependencies.
  • to use, run python3 main.py.

File descriptions

├── README.md
├── sample_data/ # empty directory because of license
├── abcnn.py # model
├── dataset.py # data load
├── main.py
├── options.toml # options
├── requirements.txt
└── train.py # training function

Options

[model]
embeddeddimension = 200 # embedding vector size
strlenmax = 15  #sentence length
filterwidth = 1
filterchannel = 130
layersize = 2
inception = true # variety receptive field
distance = 'cosine' # cosine or manhattan

Dependencies

  • JPype1==0.6.2
  • JPype1-py3==0.5.5.2
  • konlpy==0.4.4
  • mecab-python===0.996-ko-0.9.0
  • numpy==1.14.2
  • toml==0.9.4
  • torch==0.4.0

jype1, konlpy, mecab are for korean dataset you don't have to use dataset.py and these libraries.

Note

  • I used pretrained word2vec
  • I used this model to predict question similarity
  • Batch Norm makes learning faster
  • Maximum layer size is 2 in paper. Plain model cannot be learned if layer size is over 10, but model with inception module can be learned and better than shallower
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].