# TensorFlow Examples
This tutorial was designed for easily diving into TensorFlow, through examples. For readability, it includes both notebooks and source codes with explanation, for both TF v1 & v2.
It is suitable for beginners who want to find clear and concise examples about TensorFlow. Besides the traditional 'raw' TensorFlow implementations, you can also find the latest TensorFlow API practices (such as `layers`, `estimator`, `dataset`, ...).
**Update (05/16/2020):** Moving all default examples to TF2. For TF v1 examples: [check here](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v1).
## Tutorial index
#### 0 - Prerequisite
- [Introduction to Machine Learning](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/0_Prerequisite/ml_introduction.ipynb).
- [Introduction to MNIST Dataset](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/0_Prerequisite/mnist_dataset_intro.ipynb).
#### 1 - Introduction
- **Hello World** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/1_Introduction/helloworld.ipynb)). Very simple example to learn how to print "hello world" using TensorFlow 2.0+.
- **Basic Operations** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/1_Introduction/basic_operations.ipynb)). A simple example that cover TensorFlow 2.0+ basic operations.
#### 2 - Basic Models
- **Linear Regression** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/2_BasicModels/linear_regression.ipynb)). Implement a Linear Regression with TensorFlow 2.0+.
- **Logistic Regression** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/2_BasicModels/logistic_regression.ipynb)). Implement a Logistic Regression with TensorFlow 2.0+.
- **Word2Vec (Word Embedding)** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/2_BasicModels/word2vec.ipynb)). Build a Word Embedding Model (Word2Vec) from Wikipedia data, with TensorFlow 2.0+.
- **GBDT (Gradient Boosted Decision Trees)** ([notebooks](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/2_BasicModels/gradient_boosted_trees.ipynb)). Implement a Gradient Boosted Decision Trees with TensorFlow 2.0+ to predict house value using Boston Housing dataset.
#### 3 - Neural Networks
##### Supervised
- **Simple Neural Network** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/3_NeuralNetworks/neural_network.ipynb)). Use TensorFlow 2.0 'layers' and 'model' API to build a simple neural network to classify MNIST digits dataset.
- **Simple Neural Network (low-level)** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/3_NeuralNetworks/neural_network_raw.ipynb)). Raw implementation of a simple neural network to classify MNIST digits dataset.
- **Convolutional Neural Network** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/3_NeuralNetworks/convolutional_network.ipynb)). Use TensorFlow 2.0+ 'layers' and 'model' API to build a convolutional neural network to classify MNIST digits dataset.
- **Convolutional Neural Network (low-level)** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/3_NeuralNetworks/convolutional_network_raw.ipynb)). Raw implementation of a convolutional neural network to classify MNIST digits dataset.
- **Recurrent Neural Network (LSTM)** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/3_NeuralNetworks/recurrent_network.ipynb)). Build a recurrent neural network (LSTM) to classify MNIST digits dataset, using TensorFlow 2.0 'layers' and 'model' API.
- **Bi-directional Recurrent Neural Network (LSTM)** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/3_NeuralNetworks/bidirectional_rnn.ipynb)). Build a bi-directional recurrent neural network (LSTM) to classify MNIST digits dataset, using TensorFlow 2.0+ 'layers' and 'model' API.
- **Dynamic Recurrent Neural Network (LSTM)** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/3_NeuralNetworks/dynamic_rnn.ipynb)). Build a recurrent neural network (LSTM) that performs dynamic calculation to classify sequences of variable length, using TensorFlow 2.0+ 'layers' and 'model' API.
##### Unsupervised
- **Auto-Encoder** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/3_NeuralNetworks/autoencoder.ipynb)). Build an auto-encoder to encode an image to a lower dimension and re-construct it.
- **DCGAN (Deep Convolutional Generative Adversarial Networks)** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/3_NeuralNetworks/dcgan.ipynb)). Build a Deep Convolutional Generative Adversarial Network (DCGAN) to generate images from noise.
#### 4 - Utilities
- **Save and Restore a model** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/4_Utils/save_restore_model.ipynb)). Save and Restore a model with TensorFlow 2.0+.
- **Build Custom Layers & Modules** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/4_Utils/build_custom_layers.ipynb)). Learn how to build your own layers / modules and integrate them into TensorFlow 2.0+ Models.
- **Tensorboard** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/4_Utils/tensorboard.ipynb)). Track and visualize neural network computation graph, metrics, weights and more using TensorFlow 2.0+ tensorboard.
#### 5 - Data Management
- **Load and Parse data** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/5_DataManagement/load_data.ipynb)). Build efficient data pipeline with TensorFlow 2.0 (Numpy arrays, Images, CSV files, custom data, ...).
- **Build and Load TFRecords** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/5_DataManagement/tfrecords.ipynb)). Convert data into TFRecords format, and load them with TensorFlow 2.0+.
- **Image Transformation (i.e. Image Augmentation)** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/5_DataManagement/image_transformation.ipynb)). Apply various image augmentation techniques with TensorFlow 2.0+, to generate distorted images for training.
#### 6 - Hardware
- **Multi-GPU Training** ([notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/tensorflow_v2/notebooks/6_Hardware/multigpu_training.ipynb)). Train a convolutional neural network with multiple GPUs on CIFAR-10 dataset.
## TensorFlow v1
The tutorial index for TF v1 is available here: [TensorFlow v1.15 Examples](tensorflow_v1). Or see below for a list of the examples.
## Dataset
Some examples require MNIST dataset for training and testing. Don't worry, this dataset will automatically be downloaded when running examples.
MNIST is a database of handwritten digits, for a quick description of that dataset, you can check [this notebook](https://github.com/aymericdamien/TensorFlow-Examples/blob/master/notebooks/0_Prerequisite/mnist_dataset_intro.ipynb).
Official Website: [http://yann.lecun.com/exdb/mnist/](http://yann.lecun.com/exdb/mnist/).
## Installation
To download all the examples, simply clone this repository:
```
git clone https://github.com/aymericdamien/TensorFlow-Examples
```
To run them, you also need the latest version of TensorFlow. To install it:
```
pip install tensorflow
```
or (with
没有合适的资源?快使用搜索试试~ 我知道了~
TensorFlow 入门教程和示例(支持 TF v1 和 v2)
共178个文件
ipynb:96个
py:65个
png:10个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 110 浏览量
2024-03-16
21:40:14
上传
评论
收藏 9.42MB ZIP 举报
温馨提示
压缩包内的示例轻松入门 TensorFlow。 为了提高可读性,它包含了 TF v1 和 v2 的笔记本和带有解释的源代码。 除了传统的 "原始 "TensorFlow 实现.
资源推荐
资源详情
资源评论
收起资源包目录
TensorFlow 入门教程和示例(支持 TF v1 和 v2) (178个子文件)
.gitignore 118B
image_transformation.ipynb 2.39MB
image_transformation.ipynb 2.34MB
image_transformation.ipynb 2.34MB
variational_autoencoder.ipynb 292KB
variational_autoencoder.ipynb 292KB
linear_regression.ipynb 61KB
linear_regression.ipynb 61KB
dcgan.ipynb 50KB
dcgan.ipynb 49KB
dcgan.ipynb 49KB
autoencoder.ipynb 46KB
autoencoder.ipynb 46KB
gan.ipynb 46KB
gan.ipynb 46KB
autoencoder.ipynb 43KB
convolutional_network_raw.ipynb 36KB
neural_network_raw.ipynb 35KB
convolutional_network.ipynb 35KB
neural_network.ipynb 34KB
word2vec.ipynb 33KB
word2vec.ipynb 33KB
logistic_regression.ipynb 33KB
convolutional_network.ipynb 32KB
convolutional_network.ipynb 32KB
word2vec.ipynb 32KB
gradient_boosted_decision_tree.ipynb 32KB
gradient_boosted_decision_tree.ipynb 32KB
neural_network.ipynb 30KB
neural_network.ipynb 30KB
gradient_boosted_trees.ipynb 29KB
linear_regression_eager_api.ipynb 26KB
linear_regression_eager_api.ipynb 26KB
load_data.ipynb 19KB
load_data.ipynb 19KB
load_data.ipynb 19KB
linear_regression.ipynb 18KB
multigpu_training.ipynb 16KB
save_restore_model.ipynb 16KB
dynamic_rnn.ipynb 15KB
dynamic_rnn.ipynb 15KB
multigpu_cnn.ipynb 14KB
multigpu_cnn.ipynb 14KB
nearest_neighbor.ipynb 13KB
nearest_neighbor.ipynb 13KB
tensorboard.ipynb 12KB
convolutional_network_raw.ipynb 12KB
convolutional_network_raw.ipynb 12KB
bidirectional_rnn.ipynb 12KB
bidirectional_rnn.ipynb 12KB
recurrent_network.ipynb 11KB
recurrent_network.ipynb 11KB
dynamic_rnn.ipynb 10KB
build_an_image_dataset.ipynb 10KB
build_an_image_dataset.ipynb 10KB
tfrecords.ipynb 10KB
tfrecords.ipynb 10KB
tensorboard_advanced.ipynb 10KB
tensorboard_advanced.ipynb 10KB
build_custom_layers.ipynb 10KB
neural_network_eager_api.ipynb 9KB
neural_network_eager_api.ipynb 9KB
bidirectional_rnn.ipynb 8KB
save_restore_model.ipynb 8KB
save_restore_model.ipynb 8KB
tfrecords.ipynb 8KB
recurrent_network.ipynb 8KB
tensorflow_dataset_api.ipynb 8KB
tensorflow_dataset_api.ipynb 8KB
random_forest.ipynb 8KB
random_forest.ipynb 8KB
logistic_regression_eager_api.ipynb 7KB
logistic_regression_eager_api.ipynb 7KB
neural_network_raw.ipynb 7KB
neural_network_raw.ipynb 7KB
tensorboard_basic.ipynb 7KB
tensorboard_basic.ipynb 7KB
kmeans.ipynb 6KB
kmeans.ipynb 6KB
basic_eager_api.ipynb 6KB
basic_eager_api.ipynb 6KB
logistic_regression.ipynb 5KB
logistic_regression.ipynb 5KB
basic_operations.ipynb 5KB
basic_operations.ipynb 5KB
multigpu_basics.ipynb 4KB
multigpu_basics.ipynb 4KB
basic_operations.ipynb 3KB
mnist_dataset_intro.ipynb 3KB
mnist_dataset_intro.ipynb 3KB
mnist_dataset_intro.ipynb 3KB
ml_introduction.ipynb 2KB
ml_introduction.ipynb 2KB
ml_introduction.ipynb 2KB
helloworld.ipynb 2KB
helloworld.ipynb 2KB
helloworld.ipynb 2KB
LICENSE 1KB
README.md 22KB
README.md 15KB
共 178 条
- 1
- 2
资源评论
小白的杂货铺
- 粉丝: 252
- 资源: 324
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功