Starter code - Course 4, week 1, assignment1, exercise 3

In exercise 3 for week 1 of course 4, in the hints there is this statement:

“Copy the starter code of the function and run it outside of the defined function, in separate cells.”

Can anyone tell me what the starter code is referring to? Is it the function from the previous exercise?

I think they just mean the template code for the function definition. In other words, they are saying that if you want to run some experiments with the way the loops work and the array slicing, it might be a good idea to do “Insert → Cell Above” and then “copy/paste” the entire contents of the conv_forward cell there and then play around. So if you break things and want to get back to square one, it’s easier. Of course there is also a way to get a fresh copy of any notebook as described on the FAQ Thread, q.v. So if you want to run your experiments “in situ” in the real code, it’s not that big a problem if you need to get back to a clean slate.

1 Like

Or you can just do “File → Make a Copy” when you first open the notebook, so that you’ve got a saved copy you can easily revert to or “copy/paste” from. One thing to be careful of, though, if you use that strategy: be aware that the grader only grades the “official” notebook (the one opened by the “Work in Browser” link), even if you click “Submit Assignment” in another copy of the notebook. That is also discussed on the FAQ Thread.

In general, adding cells to the notebook is an excellent way to have the grader get terribly confused.

1 Like

Ok, that makes sense.

Thank you both.

My experience has been that adding cells does not cause problems, as long as one is careful not to duplicate any function names and to remove any grader “tags” in the comments (e.g. UNQ_C1 or “GRADED FUNCTION” or the like) in your added cells.

Of course the other way to make sure you don’t hit any grader problems that Tom mentions is to delete your experimental “playground” cells once you’ve completed your experiments.

1 Like