- Keras Tutorial
- Keras Useful Resources
Feb 09, 2017 IMPULSE RESPONSE & TRANSFER FUNCTION of LTI system Shrenik Jain. Best 2 Answers - Duration. LTI systems, impulse response & convolution - Duration: 13:18. Iman 30,504 views. I'm trying to get an understanding of the relationship between an FIR filter designed from 'first principles' using a filter kernel with convolution, and a filter designed in one of two ways using FFT (see below). As far as I understand, the impulse response of an FIR filter is the same thing as the filter's convolution kernel.
- Selected Reading
Let us modify the model from MPL to Convolution Neural Network (CNN) for our earlier digit identification problem.
CNN can be represented as below −
The core features of the model are as follows −
- Input layer consists of (1, 8, 28) values.
- First layer, Conv2D consists of 32 filters and ‘relu’ activation function with kernel size, (3,3).
- Second layer, Conv2D consists of 64 filters and ‘relu’ activation function with kernel size, (3,3).
- Thrid layer, MaxPooling has pool size of (2, 2).
- Fifth layer, Flatten is used to flatten all its input into single dimension.
- Sixth layer, Dense consists of 128 neurons and ‘relu’ activation function.
- Seventh layer, Dropout has 0.5 as its value.
- Eighth and final layer consists of 10 neurons and ‘softmax’ activation function.
- Use categorical_crossentropy as loss function.
- Use Adadelta() as Optimizer.
- Use accuracy as metrics.
- Use 128 as batch size.
- Use 20 as epochs.
Step 1 − Import the modules
Let us import the necessary modules.
Step 2 − Load data
Let us import the mnist dataset.
Step 3 − Process the data
Let us change the dataset according to our model, so that it can be feed into our model.
The data processing is similar to MPL model except the shape of the input data and image format configuration.
Step 4 − Create the model
Let us create tha actual model.
Step 5 − Compile the model
Let us compile the model using selected loss function, optimizer and metrics.
Step 6 − Train the model
Let us train the model using fit() method.
Executing the application will output the below information −
Step 7 − Evaluate the model
Let us evaluate the model using test data.
Executing the above code will output the below information −
The test accuracy is 99.22%. We have created a best model to identify the handwriting digits.
Step 8 − Predict
Finally, predict the digit from images as below −
The output of the above application is as follows −
The output of both array is identical and it indicate our model correctly predicts the first five images.