TFLearn Tutorials | TensorFlow入门

纪秋月
2023-12-01

TFLearn是把常见的例子做了个抽象和封装,使用更加方便,对于学习tensorflow有很大帮助。网络结构包括Alexnet、VGGNet、Network in Network、Highway Network、Residual Network、GoogleNet、AutoEncoder等,使用数据集包括MNIST和CIFAR-10等,地址:

TFLearn(https://github.com/tflearn/tflearn)

例子(https://github.com/tflearn/tflearn/tree/master/examples)

API(http://tflearn.org/doc_index/#api).

  •   基础部分

  线性回归. Implement a linear regression using TFLearn.

  https://github.com/tflearn/tflearn/blob/master/examples/basics/linear_regression.py

 逻辑处理. Implement logical operators with TFLearn (also includes a usage of'merge').

  https://github.com/tflearn/tflearn/blob/master/examples/basics/logical.py

参数保持. Save and Restore a model.

  https://github.com/tflearn/tflearn/blob/master/examples/basics/weights_persistence.py

 微调.Fine-Tune a pre-trained model on a new task.

  https://github.com/tflearn/tflearn/blob/master/examples/basics/finetuning.py

使用HDF5. Use HDF5 to handle large datasets.

  https://github.com/tflearn/tflearn/blob/master/examples/basics/use_hdf5.py

使用DASK. Use DASK to handle large datasets.

  https://github.com/tflearn/tflearn/blob/master/examples/basics/use_dask.py

  •   计算机视觉

 多层感知机. A multi-layer perceptron implementation for MNIST classificationtask.

  https://github.com/tflearn/tflearn/blob/master/examples/images/dnn.py

ConvolutionalNetwork (MNIST). A Convolutional neural network implementation for classifyingMNIST dataset.

  https://github.com/tflearn/tflearn/blob/master/examples/images/convnet_mnist.py

ConvolutionalNetwork (CIFAR-10). A Convolutional neural network implementation forclassifying CIFAR-10 dataset.

  https://github.com/tflearn/tflearn/blob/master/examples/images/convnet_cifar10.py

Network inNetwork. 'Network in Network' implementation for classifying CIFAR-10 dataset.

  https://github.com/tflearn/tflearn/blob/master/examples/images/network_in_network.py

 Alexnet.Apply Alexnet to Oxford Flowers 17 classification task.

  https://github.com/tflearn/tflearn/blob/master/examples/images/alexnet.py

VGGNet.Apply VGG Network to Oxford Flowers 17 classification task.

  https://github.com/tflearn/tflearn/blob/master/examples/images/vgg_network.py

VGGNetFinetuning(Fast Training). Use a pre-trained VGG Network and retrain it onyour own data, for fast training.

  https://github.com/tflearn/tflearn/blob/master/examples/images/vgg_network_finetuning.py

RNNPixels. Use RNN (over sequence of pixels) to classify images.

  https://github.com/tflearn/tflearn/blob/master/examples/images/rnn_pixels.py

HighwayNetwork. Highway Network implementation for classifying MNIST dataset.

  https://github.com/tflearn/tflearn/blob/master/examples/images/highway_dnn.py

 HighwayConvolutional Network. Highway Convolutional Network implementation forclassifying MNIST dataset.

  https://github.com/tflearn/tflearn/blob/master/examples/images/convnet_highway_mnist.py

ResidualNetwork (MNIST). A bottleneck residual network applied to MNIST classificationtask.

  https://github.com/tflearn/tflearn/blob/master/examples/images/residual_network_mnist.py

ResidualNetwork (CIFAR-10). A residual network applied to CIFAR-10 classification task.

  https://github.com/tflearn/tflearn/blob/master/examples/images/residual_network_cifar10.py

 GoogleInception (v3). Google's Inception v3 network applied to Oxford Flowers 17classification task.

  https://github.com/tflearn/tflearn/blob/master/examples/images/googlenet.py

AutoEncoder. An auto encoder applied to MNIST handwritten digits.

  https://github.com/tflearn/tflearn/blob/master/examples/images/autoencoder.py

  自然语言处理

       RecurrentNeural Network (LSTM). Apply an LSTM to IMDB sentiment dataset classificationtask.

  https://github.com/tflearn/tflearn/blob/master/examples/nlp/lstm.py

Bi-DirectionalRNN (LSTM). Apply a bi-directional LSTM to IMDB sentiment datasetclassification task.

  https://github.com/tflearn/tflearn/blob/master/examples/nlp/bidirectional_lstm.py

DynamicRNN (LSTM). Apply a dynamic LSTM to classify variable length text from IMDBdataset.

  https://github.com/tflearn/tflearn/blob/master/examples/nlp/dynamic_lstm.py

City NameGeneration. Generates new US-cities name, using LSTM network.

  https://github.com/tflearn/tflearn/blob/master/examples/nlp/lstm_generator_cityname.py

Shakespeares Generation. Generates new Shakespeare s, using LSTM network.

  https://github.com/tflearn/tflearn/blob/master/examples/nlp/lstm_generator_shakespeare.py

Seq2seq.Pedagogical example of seq2seq reccurent network. See this repo for fullinstructions.

  https://github.com/tflearn/tflearn/blob/master/examples/nlp/seq2seq_example.py

  https://github.com/ichuang/tflearn_seq2seq

CNN Seq.Apply a 1-D convolutional network to classify sequence of words from IMDBsentiment dataset.

  https://github.com/tflearn/tflearn/blob/master/examples/nlp/cnn_sentence_classification.py

  增强学习

AtariPacman 1-step Q-Learning. Teach a machine to play Atari games (Pacman bydefault) using 1-step Q-learning.

  https://github.com/tflearn/tflearn/blob/master/examples/reinforcement_learning/atari_1step_qlearning.py

  •   其他

推荐系统- Wide & Deep Network. Pedagogical example of wide & deep networks forrecommender systems.

  https://github.com/tflearn/tflearn/blob/master/examples/others/recommender_wide_and_deep.py

  Notebooks

 SpiralClassification Problem. TFLearn implementation of spiral classification problemfrom Stanford CS231n.

  https://github.com/tflearn/tflearn/blob/master/examples/notebooks/spiral.ipynb

  •   TensorFlow扩展

 Layers.Use TFLearn layers along with TensorFlow.

  https://github.com/tflearn/tflearn/blob/master/examples/extending_tensorflow/layers.py

Trainer.Use TFLearn trainer class to train any TensorFlow graph.

  https://github.com/tflearn/tflearn/blob/master/examples/extending_tensorflow/trainer.py

 Built-inOps. Use TFLearn built-in operations along with TensorFlow.

  https://github.com/tflearn/tflearn/blob/master/examples/extending_tensorflow/builtin_ops.py

Summaries.Use TFLearn summarizers along with TensorFlow.

  https://github.com/tflearn/tflearn/blob/master/examples/extending_tensorflow/summaries.py

 Variables.Use TFLearn variables along with TensorFlow.

https://github.com/tflearn/tflearn/blob/master/examples/extending_tensorflow/variables.py


 类似资料: