Lecture 26-30 Unit 2
Lecture 26-30 Unit 2
Lecture – 26-30
Training a CNNs: weights initialization, batch DISCOVER . LEARN . EMPOWER
normalization, hyper parameter optimization,
By: Dr. Amit Kukker 1
Deep Learning: Course Objectives
COURSE OBJECTIVES
The Course aims to:
1. Understand the key features in a neural network’s architecture
2. Understand the main fundamentals that drive Deep Learning
3. Be able to build, train and apply fully connected deep neural networks
4. Know how to implement efficient CNN, LSTM, Bi-LSTM, Autoencoder, RNN, Adversarial
Generative Networks etc.
5. Implementation the fundamental methods involved in deep learning, including the underlying
optimization concepts (gradient descent and backpropagation) and how they can be combined to
solve real-world problems.
CO3 Understand different deep neural network model architectures and its parameters tuning.
CO4 Design sequence model using different neural network architectures for new data problems based
on their requirements and problem characteristics and analyse their performance.
CO5 Describe latest research being conducted in the field and open problems that are yet to be solved.
REFERENCE BOOKS:
• R1 Fundamentals of Deep Learning: by Nithin Buduma, Nikhil Buduma and Joe Papa, OREILLY
Publication, Second Edition.
• R2 Deep Learning: A Practitioners Approach by Josh Patterson and Adam Gibson, OREILLY
Publication.
• R3 Deep Learning for Coders with fastai and PyTorch by Jeremy Howard and Sylvain Gugger, OREILLY
Publication.
• R4 Deep Learning Using Python by S Lovelyn Rose, L Ashok Kumar, D Karthika Renuka, Wiley
Publication
By: Dr. Amit Kukker 5
Training a CNNs
def he_init(shape):
fan_in, _ = shape
std = np.sqrt(2.0 / fan_in)
return np.random.randn(*shape) * std
visualize_filters(model.conv1, n_filters=6)
By: Dr. Amit Kukker 14
def visualize_feature_maps(model, image):
x = image.unsqueeze(0) # Add batch dimension
layers = [model.conv1, model.bn1, model.conv2, model.bn2]
fig, ax = plt.subplots(len(layers), 1, figsize=(20, 20))
visualize_feature_maps(model, example_image)
By: Dr. Amit Kukker 15
def saliency_map(model, image, label):
image.requires_grad_()
output = model(image)
loss = nn.CrossEntropyLoss()(output, label)
loss.backward()
plt.imshow(saliency, cmap='hot')
plt.axis('off')
plt.show()
For queries
Email: [email protected]