before we beginthe mathematical building blocks of neural networks the time axis is always the second axis (axis of index )by convention let' look at few examplesa dataset of stock prices every minutewe store the current price of the stockthe highest price in the past minuteand the lowest price in the past minute thus every minute is encoded as vectoran entire day of trading is encoded as tensor of shape ( (there are minutes in trading day)and daysworth of data can be stored in tensor of shape ( hereeach sample would be one day' worth of data dataset of tweetswhere we encode each tweet as sequence of characters out of an alphabet of unique characters in this settingeach character can be encoded as binary vector of size (an all-zeros vector except for entry at the index corresponding to the characterthen each tweet can be encoded as tensor of shape ( )and dataset of million tweets can be stored in tensor of shape ( image data images typically have three dimensionsheightwidthand color depth although grayscale images (like our mnist digitshave only single color channel and could thus be stored in tensorsby convention image tensors are always dwith onedimensional color channel for grayscale images batch of grayscale images of size could thus be stored in tensor of shape ( )and batch of color images could be stored in tensor of shape ( (see figure color channels height samples width figure image dat ensor (channels-first convent ionthere are two conventions for shapes of images tensorsthe channels-last convention (used by tensorflowand the channels-first convention (used by theanothe tensorflow machine-learning frameworkfrom googleplaces the color-depth axis at the end(samplesheightwidthcolor_depthmeanwhiletheano places the color depth axis right after the batch axis(samplescolor_depthheightwidthwith licensed to