Hi!, I was curious if its ok that the print functions of the tests are like redundant with the outputs.
Sorry, what exactly do you mean by “redundant with the outputs”?
There are many lines printed that are like the same.
Yes, that’s ok. There are multiple separate tests there, but some of them have the same cost values. Here’s my output from that test cell with code that passes the grader:
Cost after iteration 1: 0.6926114346158595
Cost after first iteration: 0.693049735659989
Cost after iteration 1: 0.6915746967050506
Cost after iteration 1: 0.6915746967050506
Cost after iteration 1: 0.6915746967050506
Cost after iteration 2: 0.6524135179683452
All tests passed.
At a quick glance, that looks identical to what you showed in your first post on this thread.
This made me curious to look at the tests. You can see them by opening the file public_tests.py
. It turns out that it does 4 tests and all 4 use the same input data, but the first three also use all the same parameters. Each of the tests is checking a different thing (type of the output, shape of the output, etc …). Then on the 4th test, they use different input values for the number of iterations and learning rate, so that cost is different even though the X and Y values are the same.
thank you!