Back to questions

nn.Module super().__init__ and mutable default arguments

Why does a custom nn.Module need super().__init__()? Separately, why is tags=[] as a default argument in Python dangerous?

Answer as you would in an interview

Answer aloud or write down a few key points. The text field is optional; the review opens after your attempt.

Loading
nn.Module super().__init__ and mutable default arguments — interview question — ML Mentor