A Structured Self-attentive Sentence Embedding

Implementation for the paper A Structured Self-Attentive Sentence Embedding, which was published in ICLR 2017: https://arxiv.org/abs/1703.03130 . USAGE: For binary sentiment classification on imdb dataset run : python classification.py “binary” For multiclass classification on reuters dataset run : python classification.py “multiclass” You can change the model parameters in the model_params.json file Other tranining parameters like number of attention hops etc can be configured in the config.json file. If you want to use pretrained glove embeddings , set the use_embeddings parameter […]

Read more

Pervasive Attention: 2D Convolutional Networks for Sequence-to-Sequence Prediction

This is a fork of Fairseq(-py) with implementations of the following models: Pervasive Attention – 2D Convolutional Neural Networks for Sequence-to-Sequence Prediction An NMT models with two-dimensional convolutions to jointly encode the source and the target sequences. Pervasive Attention also provides an extensive decoding grid that we leverage to efficiently train wait-k models. See README. Efficient Wait-k Models for Simultaneous Machine Translation Transformer Wait-k models (Ma et al., 2019) with unidirectional encoders and with joint training of multiple wait-k paths. […]

Read more

Trellis Networks for Sequence Modeling

This repository contains the experiments done in paper Trellis Networks for Sequence Modeling by Shaojie Bai, J. Zico Kolter and Vladlen Koltun. On the one hand, a trellis network is a temporal convolutional network with special structure, characterized by weight tying across depth and direct injection of the input into deep layers. On the other hand, we show that truncated recurrent networks are equivalent to trellis networks with special sparsity structure in their weight matrices. Thus trellis networks with general […]

Read more

GPU-accelerated PyTorch implementation of Zero-shot User Intent Detection via Capsule Neural Networks

This repository implements a capsule model IntentCapsNet-ZSL on the SNIPS-NLU dataset in Python 3 with PyTorch, first introduced in the paper Zero-shot User Intent Detection via Capsule Neural Networks. The code aims to follow PyTorch best practices, using torch instead of numpy where possible, and using .cuda() for GPU computation. Feel free to contribute via pull requests. Congying Xia, Chenwei Zhang, Xiaohui Yan, Yi Chang, Philip S. Yu. Zero-shot User Intent Detection via Capsule Neural Networks. In Proceedings of the […]

Read more

Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context

This repository contains the code in both PyTorch and TensorFlow for our paper Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context Zihang Dai*, Zhilin Yang*, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov (*: equal contribution) Preprint 2018 TensorFlow The source code is in the tf/ folder, supporting (1) single-node multi-gpu training, and (2) multi-host TPU training. Besides the source code, we also provide pretrained “TensorFlow” models with state-of-the-art (SoTA) performances reported in the paper. Please refer to tf/README.md […]

Read more

A Python Command line parser for common log format

Command line parser for common log format (Nginx default). Usage It counts most important data: referrers, operating systems, browsers and daily unique visitors (IPs). # Console output python parse.py sitename.log.gz # HTML output python parse.py sitename.log.gz –html ~/sitename/logs.html Install and update PIP packages. pip install -U -r requirements.txt Speed logparser 24,249/s GoAccess 6,234/s Outputs HTML output is based on Jinja2 templates. It can be improved as you see fit. Console output for Subreply for    

Read more

A custom ListView with a header that displays pictures from an URL

What is BlurStickyHeaderListView? It is a custom ListView with a header that displays pictures from an URL. It then adds a nice blur/parallax effect to the downloaded picture. It also provides the option of a sticky title. Here is a video of it in action. How do I use the thing? Add compile ‘me.emmano:blurstickyheaderlistview:0.1.+’ to the dependencies{} in your build.gradle. If you do not aleady have jcenter() added to your project, do so by adding the following to build.gradle: repositories […]

Read more
1 544 545 546 547 548 1,020