C2_W1_Assignment Practice Lab: Neural Networks for Handwritten Digit Recognition, Binary

This is regarding the practice lab - Practice Lab: Neural Networks for Handwritten Digit Recognition, Binary
Link:

Issue:
While testing the code in Exercise 2 my_dense function, getting the below error:

test_c2(my_dense)


AssertionError Traceback (most recent call last)
in
1 # UNIT TESTS
2
----> 3 test_c2(my_dense)

~/work/public_tests.py in test_c2(target)
41 assert A_tst.shape[0] == len(b_tst)
42 assert np.allclose(A_tst, [10., 20.]),
—> 43 “Wrong output. Check the dot product”
44
45 b_tst = np.array([3., 5.]) # (2 features)

AssertionError: Wrong output. Check the dot product

But when I tested the my_dense function in the previous block all the tests passed and I am getting the expected output.

Here is my function implementation:
{mentor edit: code removed}

Can you please help?

First, please don’t post your code on the forum. That isn’t allowed by the Code of Conduct. If a mentor needs to see your code, we’ll contact you with instructions.

Second, your code isn’t using the ‘g’ function parameter.
You’re using sigmoid() directly. The assignment does not say to do that. You are ignoring the ‘g’ activation function. So when your code is tested using a different activation function, it fails.