Hi team
As the title mention my notebook works as expected when running on my jupyter notebook, everything seems normal with the outputs, but when I load my code I recieved this error that doesnt tell me much.
Thanks for the help in advanced
Hi team
As the title mention my notebook works as expected when running on my jupyter notebook, everything seems normal with the outputs, but when I load my code I recieved this error that doesnt tell me much.
Thanks for the help in advanced
I am not a mentor for that course and do not have access to it, but that type of message means that there is something fundamentally wrong with your notebook from a syntax perspective. E.g. did you download the notebook, work on it with some tools other than the course website and then re-upload it? E.g. running one of the course notebooks on Colab will overwrite the JSON metadata in a way that makes them unusable on the course website.
One easy experiment to try would be this:
If that works, then it means that there was something in the generated output that confused the grader. The graders don’t need to see your output: they just call your functions with test inputs and check the results.
If that still doesn’t work, then one more thing to try, until we hear from a mentor who really knows this course, would be to get a clean copy of the notebook and then carefully “Copy/Paste” over just your completed code from the “YOUR CODE HERE” sections and then try submitting again. Here’s a thread about how to get a clean copy.
Thanks for the reply. So for the assignment, I just used the course colab env, and I tried it again with a clean copy and sadly received the same error message, but works on the colab saying there is not any problem as you can see on the next images:
Hi, Nicole.
Sorry, it looks like everything about the environment in this course is very different than the ones I am familiar with, so I was wrong to make suggestions based on my experience. Sorry, we’ll have to wait for someone with course specific knowledge to help!
Regards,
Paul
How are you defining history is it,
history = model.fit(X_train, y_train,
batch_size=batch_size,
nb_epoch=nb_epoch,
validation_data=(X_test, y_test))
as mentioned in Tensorflow? Are you using the name hist or history?
Thanks to you Paulin for trying to help, I appreciate it.
Hi @NicoleChJ
Are you doing the assignment on the course provided environment??
Kindly share the codes via personal DM. Click on my name and then message.
Training history have a class NoneType would mean you recalling a function incorrectly and not as per assignment provided metadata.
You have shared submission grader output for training history, can you share a detail screenshot of your submission grader output here and share notebook codes via personal DM
Regards
DP
DP
Hi Deepi
Yes, I am using the colab env provided by the course. Actually in this course week1 and week 2 asigments are very similar. I uploaded the task for week 2, to test it, and in this case its actually reviewing just a part of it (image bellow). At least not everything shows an error as you saw for week 1, but again I know the whole notebook its correct since I am receiving all the expected outputs on week 1 and week 2.
About this part: "can you share a detail screenshot of your submission grader output here and share notebook codes via personal ". I am not sure on what exactly are you requesting, can you share an image to understand.
Additionally, I have sent you my notebooks for both weeks. As indicated in the title of my thread, the assignment with the error image I attached above pertains to week 1. However, it appears that the reviewer is also omitting a part of the notebook on week 2.
Hi @NicoleChJ
your issue seems to be pointing towards how you recalled codes for split data is incorrect.
i am sharing a link, kindly refer the pinned comment
As for week 2, issue kindly create a new topic thread with your issue concerned. you can tag me in that post by using @
Regards
DP
Hi @Deepti_Prasad the slipt error its for week 2, please ommit it. I will create a tread later for this one.
Please review the previous messages, since for week 1 the error is:
There seems to be some confusion with assignment name
can you specify week 1 assignment name and week 2 assignment name?
the split data is related to cats vs dogs assignment but it is reflecting as week 2 in your screenshot, probably because the course 2 was recently updated.
can you confirm?
Regards
DP
Please omit the image I sent that has the split error message that its for week 2, as I mention on the last message for week 1 the error is:
Regads,
Hi @NicoleChJ
As commented previously, (YOU HAVE HARD CODED THE PATH, and instructions in the grade cell mentions
Don’t hardcode the paths. Use os.path.join to append the new directories to the root_path parameter
you need to do correction for GRADED FUNCTION: create_train_val_dirs
def create_train_val_dirs(root_path) and GRADED FUNCTION: split_data
def split_data(SOURCE_DIR, TRAINING_DIR, VALIDATION_DIR, SPLIT_SIZE)
Use the below comment link to make the correction for these two grade cells. Your output does not match for the split data grade cell. below is your output with the expected output
Regards
DP
Hi @Deepti_Prasad so reviewing the points you mention:
For the hardcoded path I dont get it, in create_train_val_dirs funtion I am using os.path.join. So in this case I did not understand what is my mistake.
For the split_data funtion I will make the print look equal to the one bellow. Thanks
Got you I will take out the learning rate.
Regards,
Hi @NicoleChJ
You are not suppose to post any codes from grade cell, kindly remove the image.
Yes you did use os.path.join, but the way recalled the code you have hard coded the path which the instruction clearly mentions you not to do.
These codes are to be recalled in single line
first for root path then for training and validation, and then as training/cats, training/dogs, validation/cats/validation/dogs
For split data, you didn’t recall file as an empty list first, then you needed to assign the that file according to the root path.
While shuffling also your codes are incorrect.
Make sure you go through the pinned comment I mentioned previously as that mentions step-wise how to write code for create root path and split data
Regards
DP
Hi @Deepti_Prasad I made the changes suggested but I am receiving exactly the same errors. I just send to you my new modify notebook. Thanks in advanced for the help
I finish all the labs, just this one its giving me problems:
Regards,
Hi @Deepti_Prasad ,
I wanted to touch base regarding my previous email. Unfortunately, I am still experiencing the same issues. I was wondering if you had the opportunity to review my corrected notebook?
Thanks in advanced for your assistance.
Regards,
Hi @NicoleChJ
I haven’t got your updated assignment copy?? Can you send, or probably I missed I am not sure!!!
Regards
DP
Hi @Deepti_Prasad I finally pass the test.
For anyone having the same problem I made the mistake of uploading the files switched, so that was why it was not reading my notebook.