model_map = {
        'deeplabv3_resnet50': network.deeplabv3_resnet50,
        'deeplabv3plus_resnet50': network.deeplabv3plus_resnet50,
        'deeplabv3_resnet101': network.deeplabv3_resnet101,
        'deeplabv3plus_resnet101': network.deeplabv3plus_resnet101,
        'deeplabv3_mobilenet': network.deeplabv3_mobilenet,
        'deeplabv3plus_mobilenet': network.deeplabv3plus_mobilenet
    }

    net = model_map[opts.model](num_classes=opts.num_classes, output_stride=opts.output_stride)
    if opts.separable_conv and 'plus' in opts.model:
        network.convert_to_separable_conv(net.classifier)
    utils.set_bn_momentum(net.backbone, momentum=0.01)
    
    # model = network.SiamSeg(net, 
    #                         image_size=(opts.crop_size, opts.crop_size),
    #                         projection_size=opts.num_classes,
    #                         use_momentum=False,
    #                 )
    model = Mymodel(
        net,
        num_classes=opts.num_classes, 
        moving_average_decay=opts.momentum,
        augment_fn = None,
        augment_fn2 = None,
        use_momentum=True,
    )

Like this