Skip to main content

Posts

Showing posts with the label CNN

CNN(Convolutional Neural Network) - Machine Learning - part 2

We have understood basics of CNN in detail in my  previous post  post now this is time to write our own code and start create our own CNN model. Please have a look on below images to understand high level CNN architecture. We shown in picture we need multiple layers in CNN so we will create multiple layers for different purpose. So let's start writing code - First layer - Convolution layer Second layer - pooling layer (For minimize the size) Third layer - Flatten layer (To convert data from 2D to 1D) Fourth layer - Dense layer (For neural network) from keras.layers import Convolution2D from keras.layers import MaxPooling2D from keras.layers import Flatten from keras.layers import Dense model = Sequential() model.add(Convolution2D(filters=32,  kernel_size=(3,3),  activation='relu',  input_shape=(64,64,3)  ) ) model.summary() Model: "sequential_3" _________________________________________________________________ Layer (type) ...

CNN(Convolutional Neural Network) - Machine Learning - part 1

  We have studied lots of things about traditional(old) ML and DL but if we would like to summarize our learning then we can say that ML learning is approach to find correct weight and  bias , but biggest difficulty to find correct  weight  and  bias is to find correct feature. Because weight and bias both are dependent of correct feature.   So finally we want a correct feature. Also I have written multiple posts on feature selection approach. But in short if data is small(small data means number of rows can be any number but number of columns are limited) we can use manual approach for feature selection and it can be done using traditional ML. But if we have Big Data(Big Data mean unlimited number of columns) we can't select feature manually and it is impossible. So for this we have new machine learning approach which is known as DL(Deep learning). In deep learning NN(Neural Network) help to select features automatically.   One of great example o...