Week 1 Programming Assignment Error at Step 16 (Lab ID eenqxiwwuefq)
Week 2 Programming Assignment Error at Step 6 (Lab ID jvzsrrxclgoy)
Attempted multiple restarts.
Week 1 Programming Assignment Error at Step 16 (Lab ID eenqxiwwuefq)
Week 2 Programming Assignment Error at Step 6 (Lab ID jvzsrrxclgoy)
Attempted multiple restarts.
hi @davaeb
Try to keep a post limited to one query at a time, I see your header mentioning week 1 and week 2 assignment and then in subsequent screenshots you shared two errors without any brief description under which exercise or for which grade function you encountered this issue, leading to confusion for a mentor to respond.
In case you have issue with two separate assignments or even with two exercises of the same assignment, try to create separate new topic for better response and learning at addressing your issue.
Now comes to your issue, the first screenshot you shared is pointing your code is incorrect as the object you have used is not a numerical or string. So check your implementation.
For your second screenshot, seems like your process tweet, where you might have used count tweet is incorrectly defined. As far as I remember those codes require the tweet argument need to defined.correctly with loops. This is the max I can respond based on the only screenshots you shared without proper description.
Regards
DP
Yes, as Deepti mentions, the normal protocol is to deal with each problem individually. Also note that the mentors do not have the superpower to look directly at anyone else’s notebooks, so giving us the Lab IDs doesn’t add any value.
In your first post, the error message seems pretty clear. it is this line of code that fails:
J = float(J)
and the error indicates that the value of J on the RHS of that expression is None
. So how could that happen? Search for the previous line on which J is defined. I understand that you didn’t write the line of code that threw the exception, but that doesn’t mean it’s not your fault: it means that the previous code you need to write did not correctly compute J. Now you need to figure out why.
The first rule of debugging is “Believe the error message”. If you don’t understand what it’s telling you, then that’s the first problem you need to solve and then work backwards from there.
DP,
Thank you for the response. Let’s start with the Week 2 issue. The screenshot below is the last cell I run before it stops working, and this is clearly where I am missing a coding entry. I’m not an experienced coder and it’s not clear to me from the hints as to what I’m supposed to input and where. I can use some help here.
These courses are in introduction to NLP, not an introduction to python. Reasonable knowledge of python is required before you start here.
What they have given you there is a template and you need to fill in code everyplace that you see the token “None
” there. That is a python placeholder that they are using to mark places you need to add code.
You need to read the instructions and understand them in order to know what the code is that should go in those places.
hi @davaeb
With what Paul has mentioned, can I know if this is your first course? in AI?
Thanks. Do you have an example of what would go there in the “None” places in Cell 5? I’m not seeing it in the instructions.
My second. Previously I completed Generative AI and Large Language Models. I’m not having any problem with the content and math in this course, but I have very little Python background. But now that I have paid for it I need to complete it. If there are some things you could assist me with in getting these lab assignments complete, then give me a recommendation on what would be a better prerequisite in terms of Python introduction. The content in this course is great and I understand it well.
Let’s for the screenshot latest you shared where you mentioning no instructions are given, I am sharing just a little above part of the instructions which mentions the key in the dictionary is tuple of stemmed word with its class label. Now notice in your grade function screenshot for the first None(in green) appears, read the instruction above, do you see any similarities in instructions?
Here the key has been recalled as pair and you need to use a tuple of word and class label which is called by what term?? (I am sorry I cannot give direct answers but We mentors can lead you towards answer. So this would be first code where you only replace the None.
Next None, mentions you if the key per the pair exist in the dictionary, increment the count. So what does incrementing mean adding as you see the second code line mentions the if statment with += here you add the increment or add by 1
Next code asks if the key means the pair is new in the dictionary, you set the count to 1. So you simply need to mention count to 1.
Okay You started Generative AI and LLM, so does this confirm you know python very well? if not try to do AI for Python Beginners, and practice as much as possible. Ask questions, to yourself, to Google even if it is silly, like why I should use tuple for a dictionary instead of strings ? what is difference. One day at a time, you will improve.
As Paul mentioned, You might find NLP little tougher as you go further courses in this specialisations as course 3 and course 4 use tensorflow which again requires you understand it from basics and you might get stuck. So I would advise try to complete this as much as possible as you said you have already paid. but then after this starts from basics, do deep learning specialisation, tensorflow, and then return back here, you can do Machine learning specialisation too after DLS, that help you understand what you studied in DLS.
Hope this helps.
Regards
DP
Thanks DP. This is helpful. No, Generative AI and LLM labs were basically coded for you. It was mostly just a process of clicking cells and looking at the inputs and outputs. There was almost no user input required, and no Python skills required. I do not have usable Python skills at this point, and I didn’t realize they were a prerequisite for this. Some questions:
Does DeepLearning.AI have a specific Python beginner course in Coursera you would recommend?
To confirm, the sequence, in order, should be DLS then the Machine Learning Specialization?
My advise of sequence
Keep Learning!
All the Best!
Regards
DP
I think MLS provides a softer introduction to Python programming than DLS.
Just my personal observation.
Students can find success either way.
I have two issues.
from utils import *
and
loading od data
I have error from these lines
Please show us the actual exception traces that you are getting.
It’s also worth trying to refresh the assignment before you run this again. Here are the instructions for how to do that. It may be that your assignment files are not complete for some reason or perhaps you accidentally deleted some of them.