Why the super().build(input_shape) in TF-AT Course 1 Week 3 Custom Layer Activation Example

Hello;

In TF-AT Course 1 Week 3, Custom Layer Activation Example, at the end of the def build(self, input_shape) function, the Notebook has this line super().build(input_shape)

But this specific super().build(input_shape) is NOT in the previous Course 1 Week 2 and is not really explained in the content of the course

And yet in the Assignment, I left this specific statement out of my Assignment and it worked …

Why is the super().build(input_shape) statement there in the example?

Warmest Regards
Steven Sim

Hi Steven,
In general, whenever you are implementing your own class, it’s good practice to call the superclass’s base method to handle any generic functionality the superclass might implement. If the superclass method doesn’t happen to do anything, then it will work fine to leave the call out, but it doesn’t hurt to leave it in, either.

I think the writer of this code example was just trying to demonstrate good coding practices, even though it isn’t specifically necessary in this case.