天天看點

ChatGirl 一個基于 TensorFlow Seq2Seq 模型的聊天機器人[中文文檔]ChatGirl 一個基于 TensorFlow Seq2Seq 模型的聊天機器人[中文文檔]

ChatGirl 一個基于 TensorFlow Seq2Seq 模型的聊天機器人[中文文檔]

簡介

簡單地說就是該有的都有了,但是總體跑起來效果還不好。

還在開發中,它工作的效果還不好。但是你可以直接訓練,并且運作。

包含預處理過的 twitter 英文資料集,訓練,運作,工具代碼,可以運作但是效果有待提高。

資料集

Twitter 資料集:

https://github.com/suriyadeepan/datasets

訓練

你需要建立一個 model 檔案夾來儲存訓練完的模型

運作這個檔案來訓練模型

Train_Model.py

運作

運作這個檔案來運作模型

Run_model.py

工具集

w2idx:單詞到 id ,用于下一步将單詞轉化為向量。

idx2w:id 到 單詞,用于将 id 轉換為單詞。

hello.py 中有兩個函數的 demo。

結果

Result.md(部分輸出)

部落格

http://www.tensorflownews.com/

開發計劃

  • 優化資料集
  • 優化模型

[under developing]

TensorFlowNews 項目推薦:

基于 TensorFlow 的神經網絡三大主流模型卷積神經網絡,循環神經網絡,序列到序列模型 TensorFlowNews 都原創了實戰項目,包含模型,代碼,資料集,工具集,歡迎 star :

  • TensorFlow CNN Model Project:

FaceRank - Rank Face by CNN Model based on TensorFlow (add keras version). FaceRank-人臉打分基于 TensorFlow (新增 Keras 版本) 的 CNN 模型(可能是最有趣的 TensorFlow 中文入門實戰項目)

https://github.com/fendouai/FaceRank
  • TensorFlow LSTM Model Project:

一個比特币交易機器人基于 Tensorflow LSTM 模型,僅供娛樂。 A Bitcoin trade robot based on Tensorflow LSTM model.Just for fun.

https://github.com/TensorFlowNews/TensorFlow-Bitcoin-Robot
  • TensorFlow Seq2Seq Model Project:

ChatGirl is an AI ChatBot based on TensorFlow Seq2Seq Model.ChatGirl 一個基于 TensorFlow Seq2Seq 模型的聊天機器人。(包含預處理過的 twitter 英文資料集,訓練,運作,工具代碼,可以運作但是效果有待提高。)

https://github.com/fendouai/ChatGirl

學習流程

如果看到這裡有很多不懂的話,建議:

* Hello World

https://zhuanlan.zhihu.com/p/27963600

* 基本概念

https://zhuanlan.zhihu.com/p/27986689

* 卷積神經網絡

https://zhuanlan.zhihu.com/p/28161292

* 訓練好模型參數的儲存和恢複代碼

https://zhuanlan.zhihu.com/p/27912379

* TensorFlowNews 專欄

https://zhuanlan.zhihu.com/TensorFlownews

* TensorFlowNews 部落格

歡迎關注我的部落格,因為我也還在學習中,現有的教程經常比較大,涉及到的隻是比較多,我會經常拆分出小的知識點,我的部落格也會把這些小的知識點記錄下來。

繼續閱讀