Not really sure why it tells me its a tuple a gives me an error during my reshape function
Hello @Pablo_Gonzalez_Uzeta ,
Welcome to the Community!
Reshape is a method only for numpy arrays. To eliminate this error where images is considered as tuple instead of array, you can convert images to array by using
np.array(images)
and then reshape it.
Nevertheless, your code is fine.I also wonder why is it considered as tuple.
You can send your notebook to me via dm such that I can check where it went wrong.By clicking on the profile picture, you will see an option to message.There you can attach your notebook.Then we can discuss the issues here, under the topic you created, on discourse.
With regards,
Nilosree Sengupta
I just sent you the new notebook and implemented your change with np.array and are getting a new error :
Hello @Pablo_Gonzalez_Uzeta ,
-
I am not getting any error for the same code.And it’s running fine when I am doing it from my end.
-
You can once Update your lab version and try with your code again.
Go to help and click on “Get latest version” -
And in your updated code, I cannot find np.array.Save the file before downloading the .ipynb file.
With regards,
Nilosree Sengupta
Hello @Pablo_Gonzalez_Uzeta ,
You can post all your problems, doubts, discuss errors and stuffs, errors, snippets, post the screenshots on discourse freely.
But, don’t post your full notebook openly on Discourse.It is against the community guidelines.So that other learners don’t see your solution and does the coding of their own.You can send it to me or any mentors for help, personally through dm.
Then we can discuss issues here or via message.
With regards,
Nilosree Sengupta
Thank you for your help, i updated my lab to the lates version and still show the same problems. Locally everything seems to work. I am not sure what the bug is, nor what i can do from my end, i aso tried rebooting the server with no success.
Hello @Pablo_Gonzalez_Uzeta ,
Checked your notebook.
Can’t spot any error for your reshape and normalize functions.
Just now I reciprocated again from my side and passing with 100% and 33/33 for this function with same code.
(Btw your other code cells require little modifications.Having errors in lower cells.Although, this will not interfere in running for first graded function, but you will get stuck in these next.Hence, just a prior check!
-
Under GRADED CLASS: myCallback
logs.get(‘accuracy’) will have 2 checks:
i. Should not be of type None//You have missed this
ii.>99.5
-
Under :GRADED FUNCTION: convolutional_model
i.You don’t need to enter the input shape for the Flatten layer.
ii.Use lesser value for dense layer.512 is not needed.
Nevertheless, I also wonder why it’s giving you tuple error because I am doing the same and passing with 100%.You can reach out to other mentors or the Coursera Support team for where is the bug.
With regards,
Nilosree Sengupta
Hello @a-zarta ,
Tagging you here.
I don’t know if I am missing to spot any error from his notebook,
but I am using the same code and getting 33/33.
Is there any bug or anything?
With regards,
Nilosree Sengupta
Hi @nilosreesengupta, sorry for the late response and thanks for looking into this!
@Pablo_Gonzalez_Uzeta the error you mention is happening when you submit for grading or within the notebook? I ask since the grader output does not show the traceback as the one in your screenshot. Let me know so I can help!
Dont worry! Thank you for replying, actually i paused and erased my notebook so it would reboot. After that, everything seemed to work out and was able to pass the assignment
Good to note that it worked @Pablo_Gonzalez_Uzeta !