W_2_Exercise 1 - identity_block

I am facing an error in this assignment. Please suggest me, how to solve it.

1 Like

Hi @Rakesh_Kumar11,

That’s strange that it did not expect initializer. One possibility is that you had modified the function definition which should look like the following:
image

There should be four arguments. See if yours is different from the above one?

Raymond

1 Like

Ok, I think we see a pattern here. This notebook was revised about 2 1/2 years ago and the definition of that function changed to include a new argument for the initializer. I hope that this is not what you are doing, but if you are copying solutions off the internet, there are a couple of things to realize:

  1. It’s against the rules and you’re also cheating yourself. What’s the point if you just copy someone else’s work and don’t understand it yourself. What do you gain by doing that?
  2. It also doesn’t work if you copy something that is too old. Just because you found some code on github doesn’t mean it’s correct or matches the current definition of the assignment.

I’m guessing this was the same thing that caused your problem with L_layer_model in C1 W4. That assignment was also updated in April 2021 and the definition of the API was changed.

2 Likes