【干貨】TensorFlow的55個(gè)經(jīng)典案例
由 judyzhong 于 星期一, 11/27/2017 - 10:15 發(fā)表
本文是TensorFlow實(shí)現(xiàn)流行機(jī)器學(xué)習(xí)算法的教程匯集,目標(biāo)是讓讀者可以輕松通過清晰簡明的案例深入了解 TensorFlow。這些案例適合那些想要實(shí)現(xiàn)一些 TensorFlow 案例的初學(xué)者泌豆。本教程包含還包含筆記和帶有注解的代碼。
第一步:給TF新手的教程指南
1:tf初學(xué)者需要明白的入門準(zhǔn)備
機(jī)器學(xué)習(xí)入門筆記:
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
MNIST 數(shù)據(jù)集入門筆記
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
2:tf初學(xué)者需要了解的入門基礎(chǔ)
Hello World
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
基本操作
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
3:tf初學(xué)者需要掌握的基本模型
最近鄰:
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
線性回歸:
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
Logistic 回歸:
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
4:tf初學(xué)者需要嘗試的神經(jīng)網(wǎng)絡(luò)
多層感知器:
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
卷積神經(jīng)網(wǎng)絡(luò):
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
循環(huán)神經(jīng)網(wǎng)絡(luò)(LSTM):
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
雙向循環(huán)神經(jīng)網(wǎng)絡(luò)(LSTM):
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
動(dòng)態(tài)循環(huán)神經(jīng)網(wǎng)絡(luò)(LSTM)
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
自編碼器
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
5:tf初學(xué)者需要精通的實(shí)用技術(shù)
保存和恢復(fù)模型
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
圖和損失可視化
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
Tensorboard——高級(jí)可視化
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
5:tf初學(xué)者需要的懂得的多GPU基本操作
多 GPU 上的基本操作
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
6:案例需要的數(shù)據(jù)集
有一些案例需要 MNIST 數(shù)據(jù)集進(jìn)行訓(xùn)練和測(cè)試径荔。運(yùn)行這些案例時(shí)少辣,該數(shù)據(jù)集會(huì)被自動(dòng)下載下來(使用 input_data.py)耐齐。
MNIST數(shù)據(jù)集筆記: https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
官方網(wǎng)站: http://yann.lecun.com/exdb/mnist/
第二步:為TF新手準(zhǔn)備的各個(gè)類型的案例厂抽、模型和數(shù)據(jù)集
初步了解:TFLearn TensorFlow
接下來的示例來自TFLearn需频,這是一個(gè)為 TensorFlow 提供了簡化的接口的庫。里面有很多示例和預(yù)構(gòu)建的運(yùn)算和層筷凤。
使用教程:TFLearn 快速入門贺辰。通過一個(gè)具體的機(jī)器學(xué)習(xí)任務(wù)學(xué)習(xí) TFLearn 基礎(chǔ)。開發(fā)和訓(xùn)練一個(gè)深度神經(jīng)網(wǎng)絡(luò)分類器嵌施。
TFLearn地址:https://github.com/tflearn/tflearn
示例:https://github.com/tflearn/tflearn/tree/master/examples
預(yù)構(gòu)建的運(yùn)算和層:http://tflearn.org/doc_index/#api
筆記:https://github.com/tflearn/tflearn/blob/master/tutorials/intro/quickstart.md
基礎(chǔ)模型以及數(shù)據(jù)集
線性回歸,使用 TFLearn 實(shí)現(xiàn)線性回歸
https://github.com/tflearn/tflearn/blob/master/examples/basics/linear_re...
邏輯運(yùn)算符莽鸭。使用 TFLearn 實(shí)現(xiàn)邏輯運(yùn)算符
https://github.com/tflearn/tflearn/blob/master/examples/basics/logical.py
權(quán)重保持吗伤。保存和還原一個(gè)模型
https://github.com/tflearn/tflearn/blob/master/examples/basics/weights_p...
微調(diào)。在一個(gè)新任務(wù)上微調(diào)一個(gè)預(yù)訓(xùn)練的模型
https://github.com/tflearn/tflearn/blob/master/examples/basics/finetunin...
使用 HDF5硫眨。使用 HDF5 處理大型數(shù)據(jù)集
https://github.com/tflearn/tflearn/blob/master/examples/basics/use_hdf5.py
使用 DASK足淆。使用 DASK 處理大型數(shù)據(jù)集
https://github.com/tflearn/tflearn/blob/master/examples/basics/use_dask.py
計(jì)算機(jī)視覺模型及數(shù)據(jù)集
多層感知器。一種用于 MNIST 分類任務(wù)的多層感知實(shí)現(xiàn)
https://github.com/tflearn/tflearn/blob/master/examples/images/dnn.py
卷積網(wǎng)絡(luò)(MNIST)礁阁。用于分類 MNIST 數(shù)據(jù)集的一種卷積神經(jīng)網(wǎng)絡(luò)實(shí)現(xiàn)
https://github.com/tflearn/tflearn/blob/master/examples/images/convnet_m...
卷積網(wǎng)絡(luò)(CIFAR-10)巧号。用于分類 CIFAR-10 數(shù)據(jù)集的一種卷積神經(jīng)網(wǎng)絡(luò)實(shí)現(xiàn)
https://github.com/tflearn/tflearn/blob/master/examples/images/convnet_c...
網(wǎng)絡(luò)中的網(wǎng)絡(luò)。用于分類 CIFAR-10 數(shù)據(jù)集的 Network in Network 實(shí)現(xiàn)
https://github.com/tflearn/tflearn/blob/master/examples/images/network_i...
Alexnet姥闭。將 Alexnet 應(yīng)用于 Oxford Flowers 17 分類任務(wù)
https://github.com/tflearn/tflearn/blob/master/examples/images/alexnet.py
VGGNet丹鸿。將 VGGNet 應(yīng)用于 Oxford Flowers 17 分類任務(wù)
https://github.com/tflearn/tflearn/blob/master/examples/images/vgg_netwo...
VGGNet Finetuning (Fast Training)。使用一個(gè)預(yù)訓(xùn)練的 VGG 網(wǎng)絡(luò)并將其約束到你自己的數(shù)據(jù)上棚品,以便實(shí)現(xiàn)快速訓(xùn)練
https://github.com/tflearn/tflearn/blob/master/examples/images/vgg_netwo...
RNN Pixels靠欢。使用 RNN(在像素的序列上)分類圖像
https://github.com/tflearn/tflearn/blob/master/examples/images/rnn_pixel...
Highway Network廊敌。用于分類 MNIST 數(shù)據(jù)集的 Highway Network 實(shí)現(xiàn)
https://github.com/tflearn/tflearn/blob/master/examples/images/highway_d...
Highway Convolutional Network。用于分類 MNIST 數(shù)據(jù)集的 Highway Convolutional Network 實(shí)現(xiàn)
https://github.com/tflearn/tflearn/blob/master/examples/images/convnet_h...
Residual Network (MNIST) 门怪。應(yīng)用于 MNIST 分類任務(wù)的一種瓶頸殘差網(wǎng)絡(luò)(bottleneck residual network)
https://github.com/tflearn/tflearn/blob/master/examples/images/residual_...
Residual Network (CIFAR-10)骡澈。應(yīng)用于 CIFAR-10 分類任務(wù)的一種殘差網(wǎng)絡(luò)
https://github.com/tflearn/tflearn/blob/master/examples/images/residual_...
Google Inception(v3)。應(yīng)用于 Oxford Flowers 17 分類任務(wù)的谷歌 Inception v3 網(wǎng)絡(luò)
https://github.com/tflearn/tflearn/blob/master/examples/images/googlenet.py
自編碼器掷空。用于 MNIST 手寫數(shù)字的自編碼器
https://github.com/tflearn/tflearn/blob/master/examples/images/autoencod...
自然語言處理模型及數(shù)據(jù)集
循環(huán)神經(jīng)網(wǎng)絡(luò)(LSTM)肋殴,應(yīng)用 LSTM 到 IMDB 情感數(shù)據(jù)集分類任
https://github.com/tflearn/tflearn/blob/master/examples/nlp/lstm.py
雙向 RNN(LSTM),將一個(gè)雙向 LSTM 應(yīng)用到 IMDB 情感數(shù)據(jù)集分類任務(wù):
https://github.com/tflearn/tflearn/blob/master/examples/nlp/bidirectiona...
動(dòng)態(tài) RNN(LSTM)坦弟,利用動(dòng)態(tài) LSTM 從 IMDB 數(shù)據(jù)集分類可變長度文本:
https://github.com/tflearn/tflearn/blob/master/examples/nlp/dynamic_lstm.py
城市名稱生成护锤,使用 LSTM 網(wǎng)絡(luò)生成新的美國城市名:
https://github.com/tflearn/tflearn/blob/master/examples/nlp/lstm_generat...
莎士比亞手稿生成,使用 LSTM 網(wǎng)絡(luò)生成新的莎士比亞手稿:
https://github.com/tflearn/tflearn/blob/master/examples/nlp/lstm_generat...
Seq2seq减拭,seq2seq 循環(huán)網(wǎng)絡(luò)的教學(xué)示例:
https://github.com/tflearn/tflearn/blob/master/examples/nlp/seq2seq_exam...
CNN Seq蔽豺,應(yīng)用一個(gè) 1-D 卷積網(wǎng)絡(luò)從 IMDB 情感數(shù)據(jù)集中分類詞序列
https://github.com/tflearn/tflearn/blob/master/examples/nlp/cnn_sentence...
強(qiáng)化學(xué)習(xí)案例
Atari Pacman 1-step Q-Learning,使用 1-step Q-learning 教一臺(tái)機(jī)器玩 Atari 游戲:
https://github.com/tflearn/tflearn/blob/master/examples/reinforcement_le...
第三步:為TF新手準(zhǔn)備的其他方面內(nèi)容
Recommender-Wide&Deep Network拧粪,推薦系統(tǒng)中 wide & deep 網(wǎng)絡(luò)的教學(xué)示例:
https://github.com/tflearn/tflearn/blob/master/examples/others/recommend...
Spiral Classification Problem修陡,對(duì)斯坦福 CS231n spiral 分類難題的 TFLearn 實(shí)現(xiàn):
https://github.com/tflearn/tflearn/blob/master/examples/notebooks/spiral...
層,與 TensorFlow 一起使用 TFLearn 層:
https://github.com/tflearn/tflearn/blob/master/examples/extending_tensor...
訓(xùn)練器可霎,使用 TFLearn 訓(xùn)練器類訓(xùn)練任何 TensorFlow 圖:
https://github.com/tflearn/tflearn/blob/master/examples/extending_tensor...
Bulit-in Ops魄鸦,連同 TensorFlow 使用 TFLearn built-in 操作:
https://github.com/tflearn/tflearn/blob/master/examples/extending_tensor...
Summaries,連同 TensorFlow 使用 TFLearn summarizers:
https://github.com/tflearn/tflearn/blob/master/examples/extending_tensor...
Variables癣朗,連同 TensorFlow 使用 TFLearn Variables:
https://github.com/tflearn/tflearn/blob/master/examples/extending_tensor...