Convolutional Neural Nets

You are currently auditing this course.
1 / 3

Convolutional Neural Network - Session 01


No hints are availble for this assesment

Answer is not availble for this assesment

Please login to comment

28 Comments

from tensorflow.examples.tutorials.mnist import input_data

Getting following error for above statement. Please suggest..

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-5-daba117be2f2> in <module>
      6 import numpy as np
      7 import matplotlib.pyplot as plt
----> 8 from tensorflow.examples.tutorials.mnist import input_data

ModuleNotFoundError: No module named 'tensorflow.examples.tutorials'
  Upvote    Share

Hi,

Please use Python3 kernel in your jupyter notebook.

Thanks.

  Upvote    Share

Hi,

What is the difference between tf.layers.conv2d() and tf.nn.conv2d()?

Thanks

 1  Upvote    Share

Hi,

Good question!

Please check the below link for a detailed explanation:

https://stackoverflow.com/questions/42785026/tf-nn-conv2d-vs-tf-layers-conv2d

Thanks.

  Upvote    Share

Based on the ppt, there is no code given for actually running the model, to classify with a given image

Can you please provide a line of code

  Upvote    Share

Hi,

Have you checked our GitHub repository for the CNN Jupyter notebook?

Thanks.

  Upvote    Share

pls share the link of the repository

  Upvote    Share

Hi Dhruv,

Please find below the link to our Machine Learning and Deep Learning repository on GitHub:

https://github.com/cloudxlab/ml

Thanks.

  Upvote    Share

is it the cnn_with_keras.ipynb?

  Upvote    Share

Hi

I have completed the course but didnt get certificate. Could you please guide me what should I do to get certificate?

Thanks

Prachi

  Upvote    Share

HI Prachi

We have repsonded to you.

Please check your mail.

  Upvote    Share

Hi Malavika

I just checked your email but Could you please tell me atleast approximate time how can I get certificate?

Thanks

Prachi

  Upvote    Share

HI Prachi

Under the current COVID-19 situation, E&ICT Academy is working with a limited workforce. Since the certificate is issued from E&ICT -IIT Roorkee, the concerned authority will take a bit more time than the usual time to check your work and update.

We will be issuing the certificate within the time span of a minimum 15 days. Hope you understand the situation. 

  Upvote    Share

Hi,

In the below code of the cnn example, 

fmap = np.zeros(shape=(7, 7, 1, 3), dtype=np.float32)
fmap[:, 3, 0, 0] = 1
fmap[3, :, 0, 1] = 1
fmap[3, 3, 0, 2] = 1

plot_image(fmap[:, :, 0, 2])
plt.show()

 

 

shape=(7, 7, 1, 3)  here 1 denotes no. of channels by how it is 1 we have converted rgb to grey so 3rd channel(colored) is removed so now no. of channels for grey image should be 2 but here why it is 1??

 

 

  Upvote    Share

Hi,

A greyscale image has one channel.

Thanks.

  Upvote    Share

This comment has been removed.

Can I summarize CNNs as reducing the image to what is relevant to our prediction?

  Upvote    Share

Hi,

That is a very broad description of CNN but yes, you can use that. However, that definition will not be entirely accurate as CNNs apply to natural language processing and other kinds of cognitive tasks.

Thanks.

  Upvote    Share

Hi

How we would decide size of receptive field and stride size?

  Upvote    Share

Hi,

For every 2x2 pooling the output size is reduced by half along each dimension. For strided convolutions, you also divide the size of each dimension by the stride. You may have to shave off some of the dimension depending on if you use padding for your convolutions. The simplest case is to use padding = floor(kernel size/2), so that a convolution dose not have any extra change on the output size.

Thanks.

  Upvote    Share

is the input in different channels need to be scaled (or normalized) before feeding to the CNN? I ask this because channels may contain different kind of information rather than just the pixel intensities

  Upvote    Share

Yes. We generally do that by simply dividing the color by 254 because the color values are between 0 to 254.

I am curious to know what else can channels have other than pixel intensities of each color R, G and B.

  Upvote    Share

My data is related to remote sensing so, in addition to RGB, there can be other data as well such as Infrared data. For this particular case, can functional API of Keras be a better choice than a sequential model?

  Upvote    Share

Yes, it would be. You define the shape of the input as per your choice.

  Upvote    Share

Yes, tensorflow keras will be a good starting point.

  Upvote    Share

is the number of filters a hyperparameter to be tuned?

  Upvote    Share

yes, we need to decide the type of filters and how many of those filters should be added. Therefore, you can say that these are hyper parameters.

  Upvote    Share