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]]
to
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])
to
feat = np.maximum(0, to_np(sf.features[0]))
At least it worked for me !