收藏 | Tensorflow實現的深度NLP模型集錦(附資源)

2021-02-21 數據派THU

收集整理了一批基於Tensorflow實現的深度學習/機器學習的深度NLP模型。

基於Tensorflow的自然語言處理模型,為自然語言處理問題收集機器學習和Tensorflow深度學習模型,100%Jupeyter NoteBooks且內部代碼極為簡潔。

資源整理自網絡,源地址:

https://github.com/huseinzol05

    

目錄

Text classification

Chatbot

Neural Machine Translation

Embedded

Entity-Tagging

POS-Tagging

Dependency-Parser

Question-Answers

Supervised Summarization

Unsupervised Summarization

Stemming

Generator

Language detection

OCR (optical character recognition)

Speech to Text

Text to Speech

Text Similarity

Miscellaneous

Attention

     

目標

原始的實現稍微有點複雜,對於初學者來說有點難。所以我嘗試將其中大部分內容簡化,同時,還有很多論文的內容亟待實現,一步一步來。

內容

文本分類:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/text-classification

1. Basic cell RNN

2. Bidirectional RNN

3. LSTM cell RNN

4. GRU cell RNN

5. LSTM RNN + Conv2D

6. K-max Conv1d

7. LSTM RNN + Conv1D + Highway

8. LSTM RNN with Attention

9. Neural Turing Machine

10. Seq2Seq

11. Bidirectional Transformers

12. Dynamic Memory Network

13. Residual Network using Atrous CNN + Bahdanau Attention

14. Transformer-XL

完整列表包含(66 notebooks)

聊天機器人:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/chatbot

1. Seq2Seq-manual

2. Seq2Seq-API Greedy

3. Bidirectional Seq2Seq-manual

4. Bidirectional Seq2Seq-API Greedy

5. Bidirectional Seq2Seq-manual + backward Bahdanau + forward Luong

6. Bidirectional Seq2Seq-API + backward Bahdanau + forward Luong + Stack Bahdanau Luong Attention + Beam Decoder

7. Bytenet

8. Capsule layers + LSTM Seq2Seq-API + Luong Attention + Beam Decoder

9. End-to-End Memory Network

10. Attention is All you need

11. Transformer-XL + LSTM

12. GPT-2 + LSTM

完整列表包含(51 notebooks)

機器翻譯(英語到越南語):

連結:

https://github.com/huseinzol05/NLP-ModelsTensorflow/tree/master/neural-machine-translation

1. Seq2Seq-manual

2. Seq2Seq-API Greedy

3. Bidirectional Seq2Seq-manual

4. Bidirectional Seq2Seq-API Greedy

5. Bidirectional Seq2Seq-manual + backward Bahdanau + forward Luong

6. Bidirectional Seq2Seq-API + backward Bahdanau + forward Luong + Stack Bahdanau Luong Attention + Beam Decoder

7. Bytenet

8. Capsule layers + LSTM Seq2Seq-API + Luong Attention + Beam Decoder

9. End-to-End Memory Network

10. Attention is All you need

完整列表包含(49 notebooks)

詞向量:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/embedded

1. Word Vector using CBOW sample softmax

2. Word Vector using CBOW noise contrastive estimation

3. Word Vector using skipgram sample softmax

4. Word Vector using skipgram noise contrastive estimation

5. Lda2Vec Tensorflow

6. Supervised Embedded

7. Triplet-loss + LSTM

8. LSTM Auto-Encoder

9. Batch-All Triplet-loss LSTM

10. Fast-text

11. ELMO (biLM)

詞性標註:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/pos-tagging

1. Bidirectional RNN + Bahdanau Attention + CRF

2. Bidirectional RNN + Luong Attention + CRF

3. Bidirectional RNN + CRF

實體識別:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/entity-tagging

1. Bidirectional RNN + Bahdanau Attention + CRF

2. Bidirectional RNN + Luong Attention + CRF

3. Bidirectional RNN + CRF

4. Char Ngrams + Bidirectional RNN + Bahdanau Attention + CRF

5. Char Ngrams + Residual Network + Bahdanau Attention + CRF

依存分析:

連結:

https://github.com/huseinzol05/NLP-ModelsTensorflow/tree/master/dependency-parser

1. Bidirectional RNN + Bahdanau Attention + CRF

2. Bidirectional RNN + Luong Attention + CRF

3. Residual Network + Bahdanau Attention + CRF

4. Residual Network + Bahdanau Attention + Char Embedded + CRF

問答:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/question-answer

1. End-to-End Memory Network + Basic cell

2. End-to-End Memory Network + GRU cell

3. End-to-End Memory Network + LSTM cell

詞幹抽取:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/stemming

1. LSTM + Seq2Seq + Beam

2. GRU + Seq2Seq + Beam

3. LSTM + BiRNN + Seq2Seq + Beam

4. GRU + BiRNN + Seq2Seq + Beam

5. DNC + Seq2Seq + Greedy

有監督摘要抽取:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/summarization

1. LSTM Seq2Seq using topic modelling

2. LSTM Seq2Seq + Luong Attention using topic modelling

3. LSTM Seq2Seq + Beam Decoder using topic modelling

4. LSTM Bidirectional + Luong Attention + Beam Decoder using topic modelling

5. LSTM Seq2Seq + Luong Attention + Pointer Generator

6. Bytenet

無監督摘要抽取:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/unsupervised-summarization

1. Skip-thought Vector (unsupervised)

2. Residual Network using Atrous CNN (unsupervised)

3. Residual Network using Atrous CNN + Bahdanau Attention (unsupervised)

OCR (字符識別):

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/ocr

1. CNN + LSTM RNN

語音識別:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/speech-to-text

1. Tacotron

2. Bidirectional RNN + Greedy CTC

3. Bidirectional RNN + Beam CTC

4. Seq2Seq + Bahdanau Attention + Beam CTC

5. Seq2Seq + Luong Attention + Beam CTC

6. Bidirectional RNN + Attention + Beam CTC

7. Wavenet

語音合成:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/text-to-speech

1. Tacotron

2. Wavenet

3. Seq2Seq + Luong Attention

4. Seq2Seq + Bahdanau Attention

生成器:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/generator

1. Character-wise RNN + LSTM

2. Character-wise RNN + Beam search

3. Character-wise RNN + LSTM + Embedding

4. Word-wise RNN + LSTM

5. Word-wise RNN + LSTM + Embedding

6. Character-wise + Seq2Seq + GRU

7. Word-wise + Seq2Seq + GRU

8. Character-wise RNN + LSTM + Bahdanau Attention

9. Character-wise RNN + LSTM + Luong Attention

語言檢測:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/language-detection

1. Fast-text Char N-Grams

文本相似性:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/text-similarity

1. Character wise similarity + LSTM + Bidirectional

2. Word wise similarity + LSTM + Bidirectional

3. Character wise similarity Triplet loss + LSTM

4. Word wise similarity Triplet loss + LSTM

注意力機制:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/attention

1. Bahdanau

2. Luong

3. Hierarchical

4. Additive

5. Soft

6. Attention-over-Attention

7. Bahdanau API

8. Luong API

其他:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/misc

1. Attention heatmap on Bahdanau Attention

2. Attention heatmap on Luong Attention

非深度學習:

連結:

https://github.com/huseinzol05/NLP-Models-Tensorflow/tree/master/not-deep-learning

1. Markov chatbot

2. Decomposition summarization (3 notebooks)

相關焦點

  • Tensorflow實現的深度NLP模型集錦
    收集整理了一批基於Tensorflow實現的深度學習/機器學習的深度NLP模型。 基於Tensorflow的自然語言處理模型,為自然語言處理問題收集機器學習和Tensorflow深度學習模型,100%Jupeyter NoteBooks且內部代碼極為簡潔。
  • TensorFlow 實現流行的機器學習算法的教程匯集
    開發和訓練一個深度神經網絡分類器。github.com/tflearn/tflearn/blob/master/examples/notebooks/spiral.ipynb可延展的 TensorFlow層,與 TensorFlow 一起使用 TFLearn 層: https://github.com/tflearn/tflearn/blob/master/examples/extending_tensorflow
  • 基於TensorFlow的深度學習實戰
    毫不誇張得說,TensorFlow的流行讓深度學習門檻變得越來越低,只要你有Python和機器學習基礎,入門和使用神經網絡模型變得非常簡單。TensorFlow簡介如前所述,TensorFlow是一個深度學習庫,使用這一框架,可以用來構建和測試深度神經網絡。深度學習讓我們能夠以極高的準確性構建複雜的應用程式。
  • 可能是史上最全的Tensorflow學習資源匯總
    本篇文章將為大家總結Tensorflow純乾貨學習資源,非常適合新手學習,建議大家收藏。想要學習更多的Tensorflow知識,歡迎點擊上方藍字,關注我們的微信公眾號。 一 、Tensorflow教程資源:1)適合初學者的Tensorflow教程和代碼示例:https://github.com/aymericdamien/TensorFlow-Examples該教程不光提供了一些經典的數據集,更是從實現最簡單的「Hello World」開始,到機器學習的經典算法,再到神經網絡的常用模型
  • TensorFlow 資源大全中文版
    TensorFlow 是一個採用數據流圖(data flow graphs),用於數值計算的開源軟體庫。節點(Nodes)在圖中表示數學操作,圖中的線(edges)則表示在節點間相互聯繫的多維數據數組,即張量(tensor)。它靈活的架構讓你可以在多種平臺上展開計算,例如臺式計算機中的一個或多個CPU(或GPU)、伺服器、行動裝置等等。
  • 深度學習100+經典模型TensorFlow與Pytorch代碼實現大集合
    【導讀】深度學習在過去十年獲得了極大進展,出現很多新的模型,並且伴隨TensorFlow和Pytorch框架的出現,有很多實現,但對於初學者和很多從業人員
  • 深度學習基礎(十):TensorFlow 2.x模型的驗證、正則化和回調
    深度學習背後的數學思想Tensorflow2實現YOLOv3目標檢測開發機器學習模型時的一個常見問題是過擬合。此外,對模型進行泛化是一項實際需求。否則,如果您無法使用機器學習模型來訓練模型所依據的數據,而無法成功地進行預測,那麼該方法又有什麼用呢?通過模型選擇和正則化來實現泛化和避免過度擬合。Tensorflow 2.x提供了 回調 函數的功能,工程師可以通過該 功能在培訓進行時根據保留的驗證集監視模型的性能。
  • 教程| 如何用TensorFlow在安卓設備上實現深度學習推斷
    她在 Insight 工作的時候,在安卓系統上用 TensorFlow 部署了一個 WaveNet 模型。本文詳細介紹了部署和實現過程。對於個人和公司來說,存在許多狀況是更希望在本地設備上做深度學習推斷的:想像一下當你在旅行途中沒有可靠的網際網路連結時,或是要處理傳輸數據到雲服務的隱私問題和延遲問題時。
  • 《概率深度學習:使用Python,Keras和TensorFlow概率》附下載
    文末附PDF及原始碼等資料下載連結Probabilistic Deep Learning: With Python,
  • tensorflow機器學習模型的跨平臺上線
    作者:劉建平編輯:黃俊嘉在用PMML實現機器學習模型的跨平臺上線中,我們討論了使用PMML文件來實現跨平臺模型上線的方法
  • Python安裝TensorFlow 2、tf.keras和深度學習模型的定義
    Keras中的Keras API實現被稱為「 tf.keras 」,因為這是引用API時使用的Python習慣用法。import tensorflowprint(tensorflow.__version__)保存文件,然後打開命令行並將目錄更改為保存文件的位置。然後輸入: 輸出版本信息確認TensorFlow已正確安裝。
  • MIT 深度學習基礎教程:七個基本框架TensorFlow代碼實戰
    具體包括前饋神經網絡、卷積神經網絡、循環神經網絡、編解碼模型、自編碼模型、生成對抗網絡和深度強化學習,七個常見系列,附詳細代碼實戰。編解碼模型詳細代碼見:https://www.tensorflow.org/tutorials/sequences/text_generation https://github.com/tensorflow/tensorflow
  • 【Github分享】語音交互、NLP相關資源分享
    導語:本文是關於語音交互和NLP相關的代碼的論文、語料庫、代碼、項目、教學等資源連結。讀完本文需要10分鐘。Kaldi ASR:Extending the ASpIRE modelFastCGI supportfor Kaldi ASRalignUsingKaldikaldi-readers-for-tensorflowkaldi-iotlattice-infolattice-char-to-word
  • TensorFlow發布JavaScript開發者的機器學習框架TensorFlow.js
    此外 Node.js 很快就會發布,它能為網站模型提供 GPU、TPU 等快速訓練與推斷的方法。在 TensorFlow.js 中,我們可以使用最底層的 JavaScript 線性代數庫或最高級的 API 在瀏覽器上開發模型,也能基於瀏覽器運行已訓練的模型。因此,它可以充分利用瀏覽器和計算機的計算資源實現非常多機器學習應用。
  • 乾貨 | NLP、知識圖譜教程、書籍、網站、工具...(附資源連結)
    本文多資源,建議閱讀收藏
  • TensorFlow 2.0正式版官宣!深度集成Keras
    例如,谷歌新聞團隊在TensorFlow 2.0中啟用了基於BERT的語言理解模型,從而極大地改進了新聞報導的覆蓋率。TensorFlow 2.0提供易於使用的API和快速實現新想法的靈活性,模型訓練和服務被無縫地集成到現有的基礎架構中。
  • 教程 | 用TensorFlow Estimator實現文本分類
    讀者無需閱讀所有之前的內容,如果想重溫某些概念,可以查看以下連結:第一部分重點討論了預建評估器(https://developers.googleblog.com/2017/09/introducing-tensorflow-datasets.html)第二部分討論了特徵列(https://developers.googleblog.com/2017/11/introducing-tensorflow-feature-columns.html
  • OpenCV+Tensorflow實現實時人臉識別演示
    相比其他的深度學習方法,FaceNet僅需要128個字節來表示一張臉。FaceNet網絡設計目標任務有如下1.驗證-驗證是否為同一張臉2.識別-識別是否為同一個人3.聚類-發現人臉具有相同之處的人關於什麼是神經網絡嵌入,這個解釋比較複雜,簡單的說神經網絡的嵌入學習可以幫助我們把離散變量表示為連續的向量,在低維空間找到最近鄰,tensorflow中的word2vec就是用了嵌入。
  • TFX 最新博文:如何使用 TensorFlow 生態系統實現快速高效的 BERT...
    通過與 TensorFlow 團隊合作,並使用他們的最新成果,Concur 實驗室最終實現了一致、簡單、快速的 BERT 模型推斷,可以在幾毫秒內實現從原始文本的分類預測。那麼,各種 TensorFlow 庫和組件如何幫助研究人員達到這個裡程碑?
  • 谷歌雲官方:一小時掌握深度學習和 TensorFlow(視頻+50PPT)
    這是一個3小時的課程(視頻+ppt),本課程為開發者提供簡要的深度學習基礎知識的介紹,以及 TensorFlow 的教學。深度學習(又名神經網絡)是建立機器學習模型的流行方法,許多開發者使用深度學習實現了他們的想法。如果你想學會深度學習,但又缺少時間,我深有同感。我大學時有一位數學老師,會對我大喊大叫:「Görner!積分在幼兒園就教過了!」