Course 4 Week 4 ChatBot UNQ_C6

I cannot figure out this error:
I’m using reshape (-1,1)


File "<ipython-input-104-e8731a2c63d0>", line 31
    input_tokens_with_batch,
    ^
SyntaxError: positional argument follows keyword argument

I have not taken NLP C4, so I don’t know the actual code here. But that error message is just a pure python syntax thing, right? It should be pretty clear if you look at the definition of the function you are invoking there. If you’re not familiar with the concept of “named” or “keyword” arguments to python functions versus “positional” parameters, try the obvious google search and read up a bit on how that works.

I fixed it. Apparently, I’ve to include the parameters name when using tax function.

1 Like

@Mubsi , in Course 4, I have passed Week 1-3 Assignments but face issue in week 4 ,exercise 6 where I am getting a value error Number of weight elements (2) does not equal the number of sublayers (10) .
Can you please help me resolve it. Thanks again.
My lab id is lrjhrwtazhld.

Hi @Riddhima_Sobti,

You were failing Ex 4, and not Ex 6 when I looked at your notebook.

Did you copy/paste your solution from online for Ex 4 ? Because the structure of the function was not the same for that exercise as we have defined. You can take a look at your notebook for more details.

Best,
Mubsi

Hi, @Mubsi , No, Chatbot exercise I did on my own. I was getting errors in Exercise 6 initially but this could be as exercise 4 was not getting solved initially and then I did have a look at the solution. Thanks for pointing out the errors.