资源算法StructuredSelfAttentionTensorflow

StructuredSelfAttentionTensorflow

2020-02-26 | |  39 |   0 |   0

Structured Self Attention - Tensorflow implementation

This repository contains the Tensorflow implementation for the paper A Structured Self-Attentive Sentence Embedding in tensorflow.

Dataset

  • Binary classification on the IMDB Dataset from Keras

  • Multiclass classification on the AGNews Dataset

Using the pretrained glove embeddings (glove.6B.300d.txt). Download the Glove Embeddings from here and place it in the glove directory

Implementation Details:

  • Binary classification on IMDB Dataset and Muticlass classification on AGNews Dataset using self attention

  • Regularization using Frobenius norm as described in the paper.

  • Model parameters are defined in model_params.json and configuration parameters in config.json.

Requirements:

  • Python 3.6

  • Tensorflow 1.4.1

  • Keras 2.0.8

  • numpy 1.9.1

  • scipy 0.14

Execution

python train.py

Results

Test Accuracy: 89.3%





上一篇:structured-self-attention

下一篇:structured_self_attention_sent_embedding

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...