Showing posts with label Deep Learning. Show all posts
Showing posts with label Deep Learning. Show all posts

Thursday, January 23, 2020

Transfer learning




TRANSFER LEARNING Using a pre trained network on images not in training set is known as transfer learning

MNIST GAN


Here we have 2 neural networks GENERATOR and  DISCRIMINATOR

DISCRIMINATOR:

  • Is a simple classifier that tries to classify the images as real from the training set or fake generated images.

Wednesday, January 22, 2020

Flattening in NLP




  • Instead of representing this 4*4 matrix, we can construct a vector with 16 entries.
  • First 4 entries correspond to the first row.similarly 2nd 3rd and 4th

Note:After converting our image to an vector they can be fed to an input layer on NLP.




Tuesday, January 21, 2020

Softmax function



  • A wonderful activation function that turns numbers aka logits into probabilities that sum to one. 
  • Outputs a vector that represents the probability distributions of a list of potential outcomes
  • Core element that is used in deep learning task

Monday, October 28, 2019

matrix transpose example (DL)

Transpose

Getting the transpose of a matrix is really easy in NumPy. Simply access its T attribute. There is also a transpose() function which returns the same thing, but you’ll rarely see that used anywhere because typing T is so much easier. :)
For example:
m = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])
m
# displays the following result:
# array([[ 1,  2,  3,  4],
#        [ 5,  6,  7,  8],
#        [ 9, 10, 11, 12]])

m.T
# displays the following result:
# array([[ 1,  5,  9],
#        [ 2,  6, 10],
#        [ 3,  7, 11],
#        [ 4,  8, 12]])
NumPy does this without actually moving any data in memory - it simply changes the way it indexes the original matrix - so it’s quite efficient.
However, that also means you need to be careful with how you modify objects, because they are sharing the same data. For example, with the same matrix m from above, let's make a new variable m_t that stores m's transpose. Then look what happens if we modify a value in m_t:
m_t = m.T
m_t[3][1] = 200
m_t
# displays the following result:
# array([[ 1,   5, 9],
#        [ 2,   6, 10],
#        [ 3,   7, 11],
#        [ 4, 200, 12]])

m
# displays the following result:
# array([[ 1,  2,  3,   4],
#        [ 5,  6,  7, 200],
#        [ 9, 10, 11,  12]])

Notice how it modified both the transpose and the original matrix, too! That's because they are sharing the same copy of data. So remember to consider the transpose just as a different view of your matrix, rather than a different matrix entirely.

Monday, April 29, 2019

One Hot Encoding

One hot encoding is a process by which categorical variables are converted into a form that could be provided to ML algorithms to do a better job in prediction.

CATEGORICAL DATA


Lets take a dataset of food names. In this dataset, if there was another food name it would have categorical value as 4.As the no of unique value increases, the categorical values increases.

Saturday, April 27, 2019

Data dimensions





SCALARS
  • They have 0 dimensions
  • Ex a persons height would be a scalar

1      2.4      -0.3

Friday, April 26, 2019

Bag of words






The Problem with Text
A problem with modeling text is that it is messy, and techniques like machine learning algorithms prefer well defined fixed-length inputs and outputs.
Machine learning algorithms cannot work with raw text directly; the text must be converted into numbers. Specifically, vectors of numbers.
In language processing, the vectors x are derived from textual data, in order to reflect various linguistic properties of the text.
This is called feature extraction or feature encoding.
A popular and simple method of feature extraction with text data is called the bag-of-words model of text.

Thursday, April 25, 2019

ERROR FUNCTION IN NN



  • In most learning networks, error is calculated as the difference between the actual output and the predicted output.
  • The error function is which tells us how far are we from the solution.
  • The function that is used to compute this error is known as loss function.
  • Different loss functions will give different errors for the same prediction and thus would have a considerable effort on the performance of the model.
EXAMPLE:
Imagine, we are standing on top of a mountain(mount Everest) and we want to descend.It is not that easy and it is cloudy and it is big and we cant see the big picture.We would look at all the possible directions where we can walk.

Wednesday, April 24, 2019

Industries to be revolutionized by artificial intelligence



Artificial intelligence (AI) and machine learning (ML) have a rapidly growing presence in today’s world, with applications ranging from heavy industry to education. From streamlining operations to informing better decision making, it has become clear that this technology has the potential to truly revolutionize how the everyday world works.

According to a panel of Forbes Technology Council members, here are 13 industries that will soon be revolutionized by AI.

1. Cybersecurity

The enterprise attack surface is massive. With its power to bring complex reasoning and self-learning in an automated fashion at massive scale, AI will be a game-changer in how we improve our cyber-resilience. - Gaurav Banga, Balbix

Monday, April 22, 2019

GAN



  • They can make entirely new image that are realistic, even they never been seen before
  • Most of the application for GANs have been images
STACKGAN 
  • Takes a textual description of the bird and than generating a high resolution of a bird matching that description.
  • These pictures have never been seen before. It is not running a image search on a database, infact GAN is drawing a probability distribution over all hypothetical images matching that description
  • We can keep running the GAN to get more images.

Tuesday, March 12, 2019

core components of self driving cars


COMPUTER VISION:
 These are like cameras where we use camera images to figure out what the world around us look like.

SENSOR FUSION:
How we incorporate data from other sensors like lasers, radars to get richer understanding of our environment.

LOCALIZATION:
To understand where we are in the current world.

PATH PLANNING:
Chart through the world to get us where we'd like to go.

CONTROL:
How we actually turn the steering wheel and hit the throttle ,hit the break in order to execute the trajectory that we built during path planning.


Monday, February 25, 2019

Categorical Variables


  • These are variables that fall into a category
  • There is no order for categorical variables
  • They are not quantitative variables

Friday, December 28, 2018

Tensorflow


  • Interface for expressing machine learning algorithms
  • Implementation for executing such algorithms
  • Framework for creating ensemble algorithms for today's most challenging problems