← 开源
EdGENetworks

attention-networks-for-classification

Hierarchical Attention Networks for Document Classification in PyTorch

Model DevelopmentArchitectureJupyter Notebook
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
606
Star
130
Fork
+0
本周
2
贡献者
创建于 2017-02-24 · 更新于 2026-07-21 · 今日第 16196 名
主要开发者
Sandeep42ZeweiChu

EdGENetworks/attention-networks-for-classification 排名第 16,196,有 606 个星标。

同类别比较

EdGENetworks/attention-networks-for-classification 排名第 16,196,此处有 8 个同类条目;wzdnzd/harvester 排名第 16,193。

同类别比较
名称排名指标
stefanopini/simple-HRNet16,180
语言:
Python
星标数:
608
分叉数:
111
简介:
Multi-person Human Pose Estimation with HRNet in Pytorch
theAIGuysCode/yolov4-custom-functions16,182
语言:
Python
星标数:
608
分叉数:
360
简介:
A Wide Range of Custom Functions for YOLOv4, YOLOv4-tiny, YOLOv3, and YOLOv3-tiny Implemented in TensorFlow, TFLite, and TensorRT.
MishaLaskin/curl16,186
语言:
Python
星标数:
607
分叉数:
92
简介:
CURL: Contrastive Unsupervised Representation Learning for Sample-Efficient Reinforcement Learning
wzdnzd/harvester16,193
语言:
Python
星标数:
607
分叉数:
136
简介:
Intelligent data acquisition framework for GitHub and web sources
levyflux/AViD16,205
语言:
Python
星标数:
606
分叉数:
95
简介:
Framework that enables fine-tuning of vision-language grounding models on custom datasets
microsoft/CvT16,207
语言:
Python
星标数:
606
分叉数:
130
简介:
This is an official implementation of CvT: Introducing Convolutions to Vision Transformers.
princeton-nlp/WebShop16,208
语言:
Python
星标数:
606
分叉数:
107
简介:
[NeurIPS 2022] 🛒WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agents
prs-eth/OverlapPredator16,209
语言:
Python
星标数:
606
分叉数:
89
简介:
[CVPR 2021, Oral] PREDATOR: Registration of 3D Point Clouds with Low Overlap.
关键参数与规格
关键参数与规格
参数值
语言Jupyter Notebook
类别Model Development
子类别Architecture
星标数606
分叉数130
贡献者2
创建日期2017-02-24
更新日期2026-07-21
1 天星标数0
7 天星标数0
排名16,196
上次排名15,984
排名变化-212
7 天星标排名15,397
上次 7 天星标排名15,405
7 天星标排名变化8
总星标排名16,656
上次总星标排名16,627
总星标排名变化-29
国家India
README 摘录

Hierarchical Attention Networks for Document Classification We know that documents have a hierarchical structure, words combine to form sentences and sentences combine to form documents. We can try to learn that structure or we can input this hierarchical structure into the model and see if it improves the performance of existing models. This paper exploits that structure to build a classification model. This is an (close) implementation of the model in PyTorch. I jointly optimize both the word and sentence

attention models with the same optimizer. This can be improved, one can sort senteces with similar length together, and minimize the paddings. ~~Pytorch does not yet support gradient masking, so padded zeros will have gradients flowing through them during backpropagation. One can create a mask, but since I am interested in using Bidirectional GRU, it is not possible to use a mask. I've seen that variable length RNN supoort is coming soon to Pytorch as well. ~~ Update: Pytorch does supoort

masked RNN now with pack_padded_sequence method. This picture from Explosion blog explains the structure perfectly. Notebook The notebook contains an example of trained model on IMDB movie review dataset. I could not get the original IMDB dataset that the paper referred to, so I have used this data The preprocessed data is available here The best accuracy that I got was around ~ 0. This dataset has only 84919 samples and 10 classes. Here is the training loss for

the dataset.

常见问题

记录了多少星标和分叉?

EdGENetworks/attention-networks-for-classification 有 606 个星标和 130 个分叉。

仓库排名是多少?

EdGENetworks/attention-networks-for-classification 排名第 16,196。

记录的语言和类别是什么?

EdGENetworks/attention-networks-for-classification 有 606 个星标,语言为 Jupyter Notebook,类别为 Model Development。

哪个仓库排名最接近?

EdGENetworks/attention-networks-for-classification 与 wzdnzd/harvester 比较,后者排名第 16,193,有 607 个星标。

README

Hierarchical Attention Networks for Document Classification

We know that documents have a hierarchical structure, words combine to form sentences and sentences combine to form documents. We can try to learn that structure or we can input this hierarchical structure into the model and see if it improves the performance of existing models. This paper exploits that structure to build a classification model.

This is an (close) implementation of the model in PyTorch.

Note:

  1. I jointly optimize both the word and sentence attention models with the same optimizer.
  2. The minibatches are padded with zeros. This can be improved, one can sort senteces with similar length together, and minimize the paddings.
  3. Pytorch does not yet support gradient masking, so padded zeros will have gradients flowing through them during backpropagation. One can create a mask, but since I am interested in using Bidirectional GRU, it is not possible to use a mask. I've seen that variable length RNN supoort is coming soon to Pytorch as well. Update: Pytorch does supoort masked RNN now with pack_padded_sequence method.

This picture from Explosion blog explains the structure perfectly.

Notebook

The notebook contains an example of trained model on IMDB movie review dataset. I could not get the original IMDB dataset that the paper referred to, so I have used this data

The preprocessed data is available here

The best accuracy that I got was around ~ 0.35. This dataset has only 84919 samples and 10 classes. Here is the training loss for the dataset.

排名相邻
同类项目