C1_W2 Exercise 1 help

for exercise 1, previously i got marks , now it is showing this message below and 0 marks
please help me to get my marks for that
I didn’t change anything
it is perfectly executing and giving correct results
it is also showing all tests passed
There was a problem grading your submission. Details:
operands could not be broadcast together with shapes (4,5) (4,4)

2 Likes

Please move your topic to the correct subcategory.
Here’s the community user guide to get started.

1 Like

Thank you
i have updated as specified
It is MLS Course 1 Week 2

1 Like

Hi,

If you passed all the tests but the grader failed you, it means you hard-coded some part of your code. Where you did that? What error grader gives you? (hard coding means you write a specific number instead of using some function like x.shape).

However, if you are sure that your code is correct, try Kernel → Restart and Clear Output. And then run all or submit the assignment and see if it works.

Best,
Saif.

1 Like

yes i have done hard coding just to understand how logic is working , then I removed it, then I restart kernel and clear output, still it is showing same errors, what should be done,
just experimenting with other methods how things are working , there I have done hard coding simple way… i ama sorry if it is wrong…i will never do it…promise

1 Like

OK. Now you changed this post from MLS to M4ML. I am a DLS mentor but M4ML mentors will respond to you soon.

By the way, one thing I can recommend is, after removing the hard code, you have to write your code as instructed in the assignment notebook. Moreover, posting your full error will help mentors to check your error.

Best,
Saif.

@Somasekhar_Donthu Can you please confirm if you need help with this? This is Math for Machine Learning: Linear Algebra.

Course 1 Week 2 Linear Algebra Programming Assignment Linear Equations Exercises 1 & 5
Error in Exercise 5
It is showing this error and not giving marks
please help me
Failed test case: Variable x_1 has incorrect type…
Expected:
<class ‘float’>,
but got:
<class ‘NoneType’>.
Error in Exercise 1
for exercise 1, previously i got marks , now it is showing this message below and 0 marks
please help me to get my marks for that
I didn’t change anything
it is perfectly executing and giving correct results
it is also showing all tests passed
There was a problem grading your submission. Details:
operands could not be broadcast together with shapes (4,5) (4,4)

1 Like

@Somasekhar_Donthu Since you are having an error on exercise 1 probably the error is coming from there. So, let’s focus on having Exercise 1 with no errors at all.

For this, please remember that you need to have 2 matrices:

  1. It will have all the coefficients for variables x1 x2 x3 x4.
  2. It will have the values after the = on the equation

For example: Let’s use these two equations:
2x1-x2+x3+x4=6
x1+2
x2-x3-x4=3

This means that the corresponding matrix A and b will be:
A = [[2,-1,1,1],[1,2,-1,-1]]
b =[6,3]

Can you please confirm that you are correctly generating both matrices based on the explanation I provided. Once you run the test it should say all the test passed.

1 Like

There was a problem grading your submission. Details:
operands could not be broadcast together with shapes (4,5) (4,4)
This error I am getting
I have done everything correct and it is showing all tests are passed
it is not giving marks while grading
that was the problem

1 Like

In course1 week2, Practice Programming assignment, exercise 4, getting error “numpy.ndarray object is not callable” any suggestiona

1 Like

Hi @REKHA ,

This sort of error usually indicates that an array is called as a function. If your code is trying to access an array’s element, use the square brackets, ie, x[1], not x(1).

1 Like


this is error

1 Like

@Somasekhar_Donthu Please find my comments:

  1. We are speaking about C1 (Linear Algebra) Week 2 - Assignment
  2. I submitted the assigned and got 100% with no issues. So, I doubt this is a problem on the platform. Refer to this image:


3. It is weird that you are getting an error for broadcasting in Exercise 1. Remember I told you we will focus on exercise 1. So, in Exercise 1 you only have to define variable A and b which are matrices. I am not sure why you are trying to broadcast which means you are trying to multiply. Please double check we are speaking about the same assignment and that you are defining the matrices according to my previous reply.

1 Like

@REKHA It seem you are posting your issue in the wrong place. This is the post for Math for Machine learning. Course: Linear Algebra. Can you please double check this is the place you want to post? Because, I do not recall seeing the sigmoid function on Linear Algebra.

Please double-check

1 Like

Hi @REKHA ,

The calculation of ds is incorrectly expressed in the form of mathematic formula. Your code has to put the formula in python code. Here, s(1-s) is treaded as a function call to s with 1-s passed in as parameter.
There is a multiplication operator in Python, *, to carry out the multiplication.

1 Like

Hi,

I am getting an Assertion error in week 2 programming assignment exercise 5, propagate function.
Any idea how to fix this

1 Like

@REKHA If this is for the Math for Machine Learning - Course 1: Linear Algebra - Week 2, then yes. I am able to help you. Can you please paste a print scree of the error so I can have a hint of what the compiler is saying?

1 Like

hello I am deo new in this platform just need help concerning the pyhton exercises with jupyter.
just report just report my problem on the exercises in this part which talks about matrix:

  1. all my results are not accepted and give me as rating 0/100 already twice however if I run my codes on anaconda jupyter it works too well I want help to know if I have to place the code exactly in which place thank you for your help do not exist to contact me also by my email address: deomundukuobama@gmail.com
1 Like

dear saifkhanengr i followed your advice which solved my issue.

Thanks

1 Like