Lesson7-CAM.ipynb...code needs correction

I think the code in cell 15 and cell 16 need correction.
I ran into errors and I changed the code as:

cell 15:

code changed from:

sfs = [SaveFeatures(o) for o in [m.layer1, m.layer2, m.layer3, m.layer4]]


sfs = [SaveFeatures(o) for o in [m[-7], m[-6], m[-5], m[-4]]]

cell 16:

code changed from:

feat = np.maximum(0, sf.features[0])


feat = np.maximum(0, to_np(sf.features[0]))

At least it worked for me !

1 Like

Thanks for that. FYI this is the forum for the old course, but your comments are related to the current course.

Good to see you are back and in good health.
I will switch to the current course forum now. Thanks