def set_model_params(self, model_id, end_point=(- 1)):
    from enums import Backbone
    assert (self.application != 'unassigned'), 'ERROR: call the set_application function before the set_model_params function'
    if (model_id == Backbone.TSM):
        from model.backbone_model.backbone_tsm import BackboneTSM as backbone_class
        pretrain_model_name = os.path.join(MODEL_SRC_DIR, 'TSM_somethingv2_RGB_resnet101_shift8_blockres_avg_segment8_e45.pth')
        save_id = self.application.tsm['filename']
        bottleneck = self.application.tsm['bottleneck']
        self.model = self.ModelDef('tsm', bottleneck, [2048], [64], 7, backbone_class, pretrain_model_name=pretrain_model_name, save_id=save_id)
    elif (model_id == Backbone.WRN):
        from model.backbone_model.backbone_wrn import BackboneWideResNet as backbone_class
        save_id = self.application.wrn['filename']
        bottleneck = self.application.wrn['bottleneck']
        self.model = self.ModelDef('wrn', bottleneck, [2048], [64], 7, backbone_class, save_id=save_id)
    elif (model_id == Backbone.VGG):
        from model.backbone_model.backbone_vgg import BackboneVGG as backbone_class
        save_id = self.application.vgg['filename']
        bottleneck = self.application.vgg['bottleneck']
        self.model = self.ModelDef('vgg', bottleneck, [512], [64], 7, backbone_class, save_id=save_id)
    elif (model_id == Backbone.I3D):
        original_size = [64, 192, 256, 832, 1024, 128]
        iad_frames = [32, 32, 32, 16, 8, 8]
        from model.backbone_model.backbone_i3d import BackboneI3D as backbone_class
        pretrain_model_name = os.path.join(MODEL_SRC_DIR, 'rgb_imagenet.pt')
        save_id = self.application.i3d['filename']
        bottleneck = self.application.i3d['bottleneck']
        self.model = self.ModelDef('i3d', bottleneck, original_size, iad_frames, 7, backbone_class, pretrain_model_name=pretrain_model_name, save_id=save_id, end_point=end_point)
def set_model_params(self, model_id, end_point=(- 1)):
    from enums import Backbone
    assert (self.application != 'unassigned'), 'ERROR: call the set_application function before the set_model_params function'
    if (model_id == Backbone.TSM):
        from model.backbone_model.backbone_tsm import BackboneTSM as backbone_class
        pretrain_model_name = os.path.join(MODEL_SRC_DIR, 'TSM_somethingv2_RGB_resnet101_shift8_blockres_avg_segment8_e45.pth')
        save_id = self.application.tsm['filename']
        bottleneck = self.application.tsm['bottleneck']
        self.model = self.ModelDef('tsm', bottleneck, [2048], [64], 7, backbone_class, pretrain_model_name=pretrain_model_name, save_id=save_id)
    elif (model_id == Backbone.WRN):
        from model.backbone_model.backbone_wrn import BackboneWideResNet as backbone_class
        save_id = self.application.wrn['filename']
        bottleneck = self.application.wrn['bottleneck']
        self.model = self.ModelDef('wrn', bottleneck, [2048], [64], 7, backbone_class, save_id=save_id)
    elif (model_id == Backbone.VGG):
        from model.backbone_model.backbone_vgg import BackboneVGG as backbone_class
        save_id = self.application.vgg['filename']
        bottleneck = self.application.vgg['bottleneck']
        self.model = self.ModelDef('vgg', bottleneck, [512], [64], 7, backbone_class, save_id=save_id)
    elif (model_id == Backbone.I3D):
        original_size = [64, 192, 256, 832, 1024, 128]
        iad_frames = [32, 32, 32, 16, 8, 8]
        from model.backbone_model.backbone_i3d import BackboneI3D as backbone_class
        pretrain_model_name = os.path.join(MODEL_SRC_DIR, 'rgb_imagenet.pt')
        save_id = self.application.i3d['filename']
        bottleneck = self.application.i3d['bottleneck']
        self.model = self.ModelDef('i3d', bottleneck, original_size, iad_frames, 7, backbone_class, pretrain_model_name=pretrain_model_name, save_id=save_id, end_point=end_point)