Deep learning course 2(CNN) week 1 assignment

Hello Everyone,
hope you are doing well.
I have been struggling a lot with this problem. I am not able to implement RMSprop because it is not getting imported from tensorflow. And after that issue, I do not complete understand what the issue is with the error message. Could someone please give me an insight regarding this? It would really be a lot of help.

Thank you :slight_smile:

Hello @Prajwal_Surendra,

We read the error message from bottom up. If we look at this part,

we see that the error was triggered when np.zeros was called. And if we look up the documentation for np.zeros, we will find that the whole underlined thing is supposed to be a tuple of integer which echos the error message: it expected integers but it was given None. We can further verify this hypothesis by experimenting it ourselves:


Look. The same error message can be reproduced.

From these two lines of the error messages:


it seems that your train_generator has used some image preprocessing steps, and it’s likely to have something to do with that. To check, you might need to first identify which preprocessing functions from the Keras package were used; then inspect each input argument to each of those functions and see if anything was wrong. This is all I can share with you based on the error traceback. However, it is going to be your assignment to fix the error, so I will stop here.

Lastly, I think you have posted this question in the wrong category because there is no such assignment in the MLS. Please share the name of the course so that I can help you move it back to the right category.


Hi ,In your data set contain objects, so convert into numeric using onehotencoder or imputer methods

In this picture top cell please remove tenserflow and type tf
from tf.keras.optimizer import RMSprop

Hello @manohar_kota

On my computer, from tf.keras.optimizers ... won’t work


However, from tensorflow.keras.optimizers ... can:



while importing we have to use full name like tensorflow

sorry if say anything wrong ,i am just biginner of this course

Hello @manohar_kota,

I agreed with your last reply :wink: I always use :raised_hands: to show support and agreement.

I hope to see more participants in this community like you who are willing to offer comments and suggestions to our fellow learners. For that, I should actually say thank you. Thank you, @manohar_kota! :slight_smile:


1 Like