Giter VIP home page Giter VIP logo

albertjava's Introduction

AlbertJava

基于纯Java实现ALBERT前向推理框架,不依赖任何第三方库

快速开始

运行test下的DemoEntityRecognizer

项目结构

src
├── main
│   ├── java
│   │   ├── com.huaze.shen
│   │   │   ├── Activation: 激活函数
│   │   │   ├── AlbertConfig: Albert模型相关的配置参数
│   │   │   ├── AlbertInput: Albert模型的输入
│   │   │   ├── AlbertModel: Albert模型
│   │   │   ├── AlbertOutput: Albert模型的输出
│   │   │   ├── DenseLayer: 全连接层
│   │   │   ├── EmbeddingLayer: Embedding层
│   │   │   ├── Entity: 实体
│   │   │   ├── EntityRecognizer: 实体识别器
│   │   │   ├── FeedForwardLayer: transformer里的ffn层
│   │   │   ├── FilePathConfig: 文件路径相关的配置参数
│   │   │   ├── LayerNormalization: 层归一化
│   │   │   ├── LookupTable: lookup表
│   │   │   ├── Matrix: 二维矩阵相关方法
│   │   │   ├── Matrix3D: 三维矩阵相关方法
│   │   │   ├── Matrix4D: 四维矩阵相关方法
│   │   │   ├── MatrixLoader: 模型加载器
│   │   │   ├── MultiHeadSelfAttentionLayer: 多头自注意力层
│   │   │   ├── SequenceLabelingModel: 序列标注模型
│   │   │   ├── Tokenization: 分词器
│   │   │   └── TransformerEncoder: 一层TransformerEncoder
│   ├── resources: 资源文件
│   │   │   ├── weights: 模型权重文件
│   │   │   ├── albert_config.properties: albert模型相关的配置参数
│   │   │   ├── file_path_config.properties: 文件路径相关的配置参数
│   │   │   ├── tag.txt: 序列标注的tag集合
│   │   │   └── vocab.txt: 词表
├── test
│   ├── java
│   │   ├── com.huaze.shen
│   │   │   ├── DemoEntityRecognizer: 命名实体识别的demo
│   │   │   ├── DemoTokenization: 分词的demo
│   │   │   ├── DemoVerifyAlbertModel: 验证AlbertModel
│   │   │   ├── DemoVerifyEmbeddingLayer: 验证EmbeddingLayer
│   │   │   ├── DemoVerifyFeedForwardLayer: 验证FeedForwardLayer
│   │   │   ├── DemoVerifyMultiHeadSelfAttentionLayer: 验证MultiHeadSelfAttentionLayer
│   │   │   ├── DemoVerifySequenceLabelingModel: 验证SequenceLabelingModel
│   │   │   └── DemoVerifyTransformerEncoder: 验证TransformerEncoder
│   ├── resources: 资源文件
│   │   │   ├── inputs: 一个样本的输入
│   │   │   └── outputs: 一个样本经过AlbertModel的所有中间输出
│   │   │   │   ├── embedding_layer: embedding层的输出
│   │   │   │   ├── encoder_0: 第一层TransformerEncoder的输出
│   │   │   │   ├── encoder_1: 第二层TransformerEncoder的输出
│   │   │   │   ├── encoder_2: 第三层TransformerEncoder的输出
│   │   │   │   ├── encoder_3: 第四层TransformerEncoder的输出
│   │   │   │   ├── encoder_4: 第五层TransformerEncoder的输出
│   │   │   │   ├── encoder_5: 第六层TransformerEncoder的输出
│   │   │   │   └── output_layer: 输出层的输出

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.