Posts

Google's Tensor-flow basic operations

tensorflow basic operations Tensorflow Basics ¶ REF : https://www.tensorflow.org/programmers_guide/low_level_intro In order to run tensorfluw on jupyter, install it using pip install tensorflow In simple terms tensorflow means the flow of tensors through various mathematical nodes. A sequence of interconnected nodes is a tensor graph . A tensor is the simplest unit of data in a tensorflow graph. In [1]: # To start-off, import tensorflow import tensorflow as tf In [2]: # Additional libraries: import numpy as np 1. Types of tensors ¶ Each tensor has three basic properties: dtype (e.g. int32, float64, string) Rank - The dimension of a tensor e.g.1D for a vector tensor. rank = 0 >> constant Shape - The length of each dimension e.g. (2,3) for a rank = 2 or 2D tensor 1.1. tf.constant In [3]: # Type 1: Cons...