def _init_weights(self):
        """
        Initialize the weights of the model.

        Official init from torch repo, using kaiming_normal for conv layers
        and normal for linear layers.

        """
        for m in self.modules():
            if isinstance(m, nn.Conv1d):
                nn.init.kaiming_normal_(m.weight.data)
            elif isinstance(m, nn.BatchNorm1d):
                m.weight.data.fill_(1)
                m.bias.data.zero_()
            elif isinstance(m, nn.Linear):
                m.bias.data.zero_()

        Initialize the weights of the model.

        Official init from torch repo, using kaiming_normal for conv layers
        and normal for linear layers.

        
braindecode/models/sparcnet.py