Last November, the Google Brain team released Eager Execution, a new run-defined interface that introduces dynamic graph mechanisms to TensorFlow, one of the most popular deep learning frameworks. Eager makes development much more intuitive, making getting started with TensorFlow much easier. This article introduces a simple tutorial on building neural networks using TensorFlow Eager.


Projects link: https://github.com/madalinabuzau/tensorflow-eager-tutorials


This article is intended to help those who want to gain deep learning practice experience through the TensorFlow Eager pattern. TensorFlow Eager allows you to build neural networks as easily as you can with Numpy, with the great advantage of automatic differentiation (no handwritten back propagation, (*^▽^*)!). . It can also run on GPU, which makes neural network training speed significantly faster.


The team behind Google Brain has stated that the main benefits of Eager Execution are as follows:


  • Quick debugging for immediate runtime errors and integration with Python tools

  • Dynamic models are supported with easy-to-use Python control flow

  • Strong support for customization and high ladder

  • Applies to almost any TensorFlow operation available


I will try to make this tutorial accessible to everyone, so I will try to solve problems without GPU processing.


The version of TensorFlow used in the tutorial is version 1.7.


start


01. Build a Simple Neural network – The following figure shows how to build and train a single hidden layer neural network using TensorFlow Eager mode on a compositely generated data set.



Using Metrics in Eager Mode — The following figure will teach you how to use metrics compatible with the Eager mode for three different machine learning problems (multiple classifications, unbalanced data sets, and regressions).


Simple but practical knowledge


03. Save and Restore trained Models – The following figure shows how to save trained models and then restore them to make predictions for new data.



04. Transferring text data to TFRecords — The following figure will show you how to store variable sequence length text data to TFRecords. When a data set is read using iterators, the data can be populated quickly in a batch.



05. Transferring Image Data to TFRecords – The following figure shows how to transfer image data and its metadata to TFRecords.



06. How to batch read TFRecords Data – The following figure will teach you how to batch read variable sequence length data or image data from TFRecords.

Convolutional Neural Network (CNN)


07. Build a CNN Model for Emotion Recognition — The following figure will teach you to build a CNN model from scratch using the TensorFlow Eager API and FER2013 dataset. Once you’re done, you’ll be able to experiment with your own neural network using a webcam, which is a great try!


Recurrent Neural Network (RNN)


08. Build a Dynamic RNN for Sequence classification — learn how to use variable sequence input data. The following figure shows how to build a dynamic RNN using the TensorFlow Eager API and the Stanford Large Movie Review Dataset.


09. Build a Temporal Regression RNN — The following figure shows how to build an RNN model for temporal prediction.



Follow public accounts

【 Pegasus Club 】





From beginning to research, the 10 most Readable books in the field of artificial intelligence

RSVP number “2” machine learning & Data Science must-read classic book with resource pack!

Into AI & ML: Learning machine Learning from Basic Statistics (PDF download)

Answer the number “4” to learn about ARTIFICIAL intelligence, 30 books should not be missed (with electronic PDF download)

Reply number “5” big data learning material download, novice guide, data analysis tools, software use tutorial

Answer number “6” AI AI: 54 Industry Blockbuster Reports

TensorFlow Introduction, Installation tutorial, Image Recognition application (with installation package/guide)

Reply to the number “8” full analysis of big data data (352 cases + big data transaction white paper + Domestic and foreign policy collection)

Reply number “9” dry | selections for 10 big data books (junior/intermediate/advanced) become large data expert!

According to a 160-page McKinsey report, 800 million people around the world could lose their jobs to machines by 2030

AI Artificial Intelligence/Big Data /Database/Linear Algebra/Python/ Machine Learning /Hadoop

Reply number “12” small white | Python + + machine learning Matlab neural network theory + practice + + + depth video + courseware + source code, download attached!

Reply number “13” big data technology tutorial + books +Hadoop video + big data research newspaper + science books

Reply number “14” small white | machine learning and deep learning required books + machine learning field video/PPT + large data analysis books recommend!

Big data Hadoop technology e-books + technical theory + actual combat + source code analysis + experts to share PPT

Reply to the number “16” 100G Python from beginner to Master! Complete video tutorials + Python Classics for self-study!

Answer number “17” 【 dry article 】31 papers on deep learning required reading

526 Industry reports + White papers: AI, Artificial intelligence, robotics, smart mobility, smart home, Internet of Things, VR/AR, blockchain, etc. (download)

Reply number “19” 800G ARTIFICIAL intelligence learning materials :AI ebook +Python language introduction + tutorial + machine learning and other limited time free access!

17 mind maps for machine learning statistics

Ten years ago on This day on Machine Learning Projects.

Machine learning: How to go from beginner to Never Giving up? (With benefits)

Respond to digital “24” flash download | 132 g programming data: Python, JAVA, C, C + +, robot programming, PLC, entry to the proficient in ~

Reply number “25” limited resources | 177 g Python/machine learning/TensorFlow video/deep learning algorithm, introduction to cover/intermediate/project each stage!

FMI Artificial Intelligence and Big Data Summit Guest Speech PPT

Top 10 AI Jianghu Fields

Machine Learning Practical Experience Guide

More than 100 Papers on deep Learning

Top ten Classic Algorithms of Data Mining

6.10 Ele. me & Pegasus Project Management Practice PPT