本文是TensorFlow實現流行機器學習算法的教程匯集,目標是讓讀者可以輕松通過清晰簡明的案例深入了解 TensorFlow。這些案例適合那些想要實現一些 TensorFlow 案例的初學者。本教程包含還包含筆記和帶有注解的代碼。
1:tf初學者需要明白的入門準備
機器學習入門筆記:
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
MNIST 數據集入門筆記
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
2:tf初學者需要了解的入門基礎
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初學者需要掌握的基本模型
最近鄰:
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初學者需要嘗試的神經網絡
多層感知器:
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...
循環神經網絡(LSTM):
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
雙向循環神經網絡(LSTM):
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
動態循環神經網絡(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初學者需要精通的實用技術
保存和恢復模型
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——高級可視化
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
5:tf初學者需要的懂得的多GPU基本操作
多 GPU 上的基本操作
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
https://github.com/aymericdamien/TensorFlow-Examples/blob/master/example...
6:案例需要的數據集
有一些案例需要 MNIST 數據集進行訓練和測試。運行這些案例時,該數據集會被自動下載下來(使用 input_data.py)。
MNIST數據集筆記: https://github.com/aymericdamien/TensorFlow-Examples/blob/master/noteboo...
官方網站:
第二步:為TF新手準備的各個類型的案例、模型和數據集
初步了解:TFLearn TensorFlow
接下來的示例來自TFLearn,這是一個為 TensorFlow 提供了簡化的接口的庫。里面有很多示例和預構建的運算和層。
使用教程:TFLearn 快速入門。通過一個具體的機器學習任務學習 TFLearn 基礎。開發和訓練一個深度神經網絡分類器。
TFLearn地址:https://github.com/tflearn/tflearn
示例:https://github.com/tflearn/tflearn/tree/master/examples
預構建的運算和層:#api
筆記:https://github.com/tflearn/tflearn/blob/master/tutorials/intro/quickstart.md
基礎模型以及數據集
線性回歸,使用 TFLearn 實現線性回歸
https://github.com/tflearn/tflearn/blob/master/examples/basics/linear_re...
邏輯運算符。使用 TFLearn 實現邏輯運算符
https://github.com/tflearn/tflearn/blob/master/examples/basics/logical.py
權重保持。保存和還原一個模型
https://github.com/tflearn/tflearn/blob/master/examples/basics/weights_p...
微調。在一個新任務上微調一個預訓練的模型
https://github.com/tflearn/tflearn/blob/master/examples/basics/finetunin...
使用 HDF5。使用 HDF5 處理大型數據集
https://github.com/tflearn/tflearn/blob/master/examples/basics/use_hdf5.py
使用 DASK。使用 DASK 處理大型數據集
https://github.com/tflearn/tflearn/blob/master/examples/basics/use_dask.py
計算機視覺模型及數據集
多層感知器。一種用于 MNIST 分類任務的多層感知實現
https://github.com/tflearn/tflearn/blob/master/examples/images/dnn.py
卷積網絡(MNIST)。用于分類 MNIST 數據集的一種卷積神經網絡實現
https://github.com/tflearn/tflearn/blob/master/examples/images/convnet_m...
卷積網絡(CIFAR-10)。用于分類 CIFAR-10 數據集的一種卷積神經網絡實現
https://github.com/tflearn/tflearn/blob/master/examples/images/convnet_c...
網絡中的網絡。用于分類 CIFAR-10 數據集的 Network in Network 實現
https://github.com/tflearn/tflearn/blob/master/examples/images/network_i...
Alexnet。將 Alexnet 應用于 Oxford Flowers 17 分類任務
https://github.com/tflearn/tflearn/blob/master/examples/images/alexnet.py
VGGNet。將 VGGNet 應用于 Oxford Flowers 17 分類任務
https://github.com/tflearn/tflearn/blob/master/examples/images/vgg_netwo...
VGGNet Finetuning (Fast Training)。使用一個預訓練的 VGG 網絡并將其約束到你自己的數據上,以便實現快速訓練
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 數據集的 Highway Network 實現
https://github.com/tflearn/tflearn/blob/master/examples/images/highway_d...
Highway Convolutional Network。用于分類 MNIST 數據集的 Highway Convolutional Network 實現
https://github.com/tflearn/tflearn/blob/master/examples/images/convnet_h...
Residual Network (MNIST) 。應用于 MNIST 分類任務的一種瓶頸殘差網絡(bottleneck residual network)
https://github.com/tflearn/tflearn/blob/master/examples/images/residual_...
Residual Network (CIFAR-10)。應用于 CIFAR-10 分類任務的一種殘差網絡
https://github.com/tflearn/tflearn/blob/master/examples/images/residual_...
Google Inception(v3)。應用于 Oxford Flowers 17 分類任務的谷歌 Inception v3 網絡
https://github.com/tflearn/tflearn/blob/master/examples/images/googlenet.py
自編碼器。用于 MNIST 手寫數字的自編碼器
https://github.com/tflearn/tflearn/blob/master/examples/images/autoencod...
自然語言處理模型及數據集
循環神經網絡(LSTM),應用 LSTM 到 IMDB 情感數據集分類任
https://github.com/tflearn/tflearn/blob/master/examples/nlp/lstm.py
雙向 RNN(LSTM),將一個雙向 LSTM 應用到 IMDB 情感數據集分類任務:
https://github.com/tflearn/tflearn/blob/master/examples/nlp/bidirectiona...
動態 RNN(LSTM),利用動態 LSTM 從 IMDB 數據集分類可變長度文本:
https://github.com/tflearn/tflearn/blob/master/examples/nlp/dynamic_lstm.py
城市名稱生成,使用 LSTM 網絡生成新的美國城市名:
https://github.com/tflearn/tflearn/blob/master/examples/nlp/lstm_generat...
莎士比亞手稿生成,使用 LSTM 網絡生成新的莎士比亞手稿:
https://github.com/tflearn/tflearn/blob/master/examples/nlp/lstm_generat...
Seq2seq,seq2seq 循環網絡的教學示例:
https://github.com/tflearn/tflearn/blob/master/examples/nlp/seq2seq_exam...
CNN Seq,應用一個 1-D 卷積網絡從 IMDB 情感數據集中分類詞序列
https://github.com/tflearn/tflearn/blob/master/examples/nlp/cnn_sentence...
強化學習案例
Atari Pacman 1-step Q-Learning,使用 1-step Q-learning 教一臺機器玩 Atari 游戲:
https://github.com/tflearn/tflearn/blob/master/examples/reinforcement_le...
第三步:為TF新手準備的其他方面內容
Recommender-Wide&Deep Network,推薦系統中 wide & deep 網絡的教學示例:
https://github.com/tflearn/tflearn/blob/master/examples/others/recommend...
Spiral Classification Problem,對斯坦福 CS231n spiral 分類難題的 TFLearn 實現:
https://github.com/tflearn/tflearn/blob/master/examples/notebooks/spiral...
層,與 TensorFlow 一起使用 TFLearn 層:
https://github.com/tflearn/tflearn/blob/master/examples/extending_tensor...
訓練器,使用 TFLearn 訓練器類訓練任何 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...
評論