Hi - my compute gradient function seems to output the expected values as show in the screenshot but fails when running the compute_gradient_test function with the error ValueError: operands could not be broadcast together with shapes (4,) (97,). Any ideas?
You might consider why you’re using ‘y’ in one line of code, and ‘y_train’ in the other.
Thanks, updated to y and its working now.