def weight_init(m):
    """call weight initialization for model n via n.appy(weight_init)"""
    if isinstance(m, nn.Conv1d) or isinstance(m, nn.Linear):
        nn.init.kaiming_normal_(m.weight)
        if m.bias is not None:
            nn.init.zeros_(m.bias)
    if isinstance(m, nn.BatchNorm1d):
        nn.init.constant_(m.weight, 1)
        nn.init.constant_(m.bias, 0)
    if isinstance(m, SqueezeExcite1d):
        stdv1 = math.sqrt(2.0 / m.w1.size[0])
        nn.init.normal_(m.w1, 0.0, stdv1)
        stdv2 = math.sqrt(1.0 / m.w2.size[1])
        nn.init.normal_(m.w2, 0.0, stdv2)
call weight initialization for model n via n.appy(weight_init)
analyze/convnexts4nd/src/models/baselines/nonaka/basic_conv1d.py