Introduction to Tensorflow
Tensorflow for beginners for free. Your free educational resource online!
Tensorflow is a more complex library for distributed numerical computation using data flow graphs. Hands-On Machine Learning with Scikit Learn and Tensorflow by Aurélien Géron
Tensorflow makes defining functions on tensors and computing with tensors easy. It also makes computing gradient fast and easy. Technically a scalar, vector and a matrix are all tensors. In practice, tensors are usually matrices much higher than 3 dimensions.
Tensor
Tensor can be a constant or a variable. TechnicalLy a vector and a matrix is still a tensor, though tensors usually refer to high dimensional matrices. Photos are commonly seen 3 dimensional tensors: 3 color channels (Red Green Blue aka RGB), and each slice of channel has a weight and height, the same weight and height across all channels.
Tensorflow and Numpy
Numpy also support ndarray and is great for matrix manipulation but no GPU support, cannot create tensor functions.
Tensorflow and Numpy codes for creating placeholder, basic matrix math look very similar with the exception of creating graphs and sessions. (With eager execution as first class citizens, this difference is quickly shrinking).
Google also calls Tensorflow a Python based C++ enabled deep learning tool kit.
Graphs and Sessions
Tensorflow calculations are specified in graph forms, and sessions run and execute such graphs. Though with the new release of tensorflow, you can now do eager execution — run tensorflow without having to init a session.
Tensorflow graph cannot be cyclic. Graph outputs tensor.
For up to date sample codes, advanced articles subscribe at hi@uniqtech.co
Though keep in mind graph session is useful for Tensorflow 1.0 You will not have to start a session variable in Tensorflow 2.0
Use Case of Tensorflow
Google claims that Tensorflow is used in its applications like Google Photo.
Deep Learning Software Zoo
Tensorflow competitors mostly predates TF and also inspired TF: Theano (Keras Lasagne), Torch, Caffe, CuDNN, and more. You can code with Python using Theano and Tensorflow. Theano has academic root. Google Tensorflow is partly inspired by Theano. Tensorflow supports cloud computing, parallel systems and thus can be more scalable. Tensorflow is open-source.
As of today many deep learning frameworks have faded in population. Keras is integrated in tensorflow. And Facebook supports Pytorch a deep learning framework in python also enabled by C++ developed in house.
Basically Google backs Tensorflow and Facebook backs Pytorch.
Tensorflow Playground
Play with the Tensorflow playground until your can model a spiral data structure. It’d be fun!
Resources: Stanford Tensorflow class
Source:
An excellent overview of tensorflow
TensorBoard
TensorBoard handles Tensorflow’s visualization functionality. It can visualize machine learning experiments and metrics: tracking and visualizing loss, accuracy, visualizing model graph operations (ops) and layers, visualizing weights, biases, and other tensors as they change over time using histograms; projecting embeddings to a lower dimensional space (Natural Language Processing NLP), displaying images, texts, and audio data, profiling tensorflow programs — according to the official documentation.
In other words TensorBoard can track losses, hyperparameters, weights and the computational graph itself.
Imperative versus Declarative Programming
Sraj:
Beginner Tutorials
- Tensorflow for Poets
- Tensorflow in person class with General Assembly