Dls Course 1 Week 4 Assignment 1 exercise 8

I don’t know why I’m getting this error. It seems that the linear_backward function is not returning 3 values, but it worked fine on the previous exercise.

Hi @gustavo_igor ,

Can you do a quick check by running your whole notebook from the beginning up to the code cell in question? Or simply click “Kernel” > “Restart & run all” ?

Does linear_backward still pass Ex 7 test but fail Ex 8?

Raymond

Hi, I did the “Restart & run all” command and the problem persists. And yes, the linear_backward still pass the Ex 7.

Hello,

If we look at this line of your screenshot again

螢幕擷取畫面_20221128_081752

Then,

The problem doesn’t come from linear_backward, but cache.

I suggest you to review the requirement of linear_backward for when you call it, what cache is needed.

Cheers,
Raymond

I figured out the problem, Thank You!

I am facing similar dimension mismatch (IndexError). Please how can i rectify this

Your code seems correct to me. Please verify the following:

  1. Do Kernel → Restart and Run all cells
  2. Have you changed any pre-written code?
1 Like

Hey @saifkhanengr, thanks for the response.

  1. Yes I did the kernel restart and ran all the cells.
  2. I didn’t change the pre-written code.