Configs¶
Dataset Configs¶
ImageFolder¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.imagefolder import ImageFolder
#### Config ####
# add your transforms below
transforms = Compose([
CenterCrop((544,544))
,RandomHFlip()
,RandomVFlip()
,RandomRotation()
,ColorJitter()
,ToTensor()
])
# PyTorch dataset
path = '/path/to/dataset'
dataset = ImageFolder(path,transform=transforms)
ImageFolderTest¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.imagefolder import ImageFolder
#### Config ####
# add your transforms below
transforms = Compose([
CenterCrop((544,544))
,ToTensor()
])
# PyTorch dataset
path = '/path/to/testdataset'
dataset = ImageFolder(path,transform=transforms)
ImageFolderInference¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.imagefolderinference import ImageFolderInference
#### Config ####
# add your transforms below
transforms = Compose([
CenterCrop((544,544))
,ToTensor()
])
# PyTorch dataset
path = '/path/to/folder/containing/images'
dataset = ImageFolderInference(path,transform=transforms)
CHASEDB1¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.db.chasedb1 import Database as CHASEDB1
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.binsegdataset import BinSegDataset
#### Config ####
transforms = Compose([
Crop(0,18,960,960)
,RandomHFlip()
,RandomVFlip()
,RandomRotation()
,ColorJitter()
,ToTensor()
])
# bob.db.dataset init
bobdb = CHASEDB1(protocol = 'default')
# PyTorch dataset
dataset = BinSegDataset(bobdb, split='train', transform=transforms)
CHASEDB1TEST¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.db.chasedb1 import Database as CHASEDB1
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.binsegdataset import BinSegDataset
#### Config ####
transforms = Compose([
Crop(0,18,960,960)
,ToTensor()
])
# bob.db.dataset init
bobdb = CHASEDB1(protocol = 'default')
# PyTorch dataset
dataset = BinSegDataset(bobdb, split='test', transform=transforms)
COVD-DRIVE¶
from bob.ip.binseg.configs.datasets.stare544 import dataset as stare
from bob.ip.binseg.configs.datasets.chasedb1544 import dataset as chase
from bob.ip.binseg.configs.datasets.iostarvessel544 import dataset as iostar
from bob.ip.binseg.configs.datasets.hrf544 import dataset as hrf
import torch
#### Config ####
# PyTorch dataset
dataset = torch.utils.data.ConcatDataset([stare,chase,hrf,iostar])
COVD-DRIVE_SSL¶
from bob.ip.binseg.configs.datasets.stare544 import dataset as stare
from bob.ip.binseg.configs.datasets.chasedb1544 import dataset as chase
from bob.ip.binseg.configs.datasets.iostarvessel544 import dataset as iostar
from bob.ip.binseg.configs.datasets.hrf544 import dataset as hrf
from bob.db.drive import Database as DRIVE
from bob.ip.binseg.data.transforms import *
import torch
from bob.ip.binseg.data.binsegdataset import BinSegDataset, SSLBinSegDataset, UnLabeledBinSegDataset
#### Config ####
# PyTorch dataset
labeled_dataset = torch.utils.data.ConcatDataset([stare,chase,iostar,hrf])
#### Unlabeled STARE TRAIN ####
unlabeled_transforms = Compose([
CenterCrop((544,544))
,RandomHFlip()
,RandomVFlip()
,RandomRotation()
,ColorJitter()
,ToTensor()
])
# bob.db.dataset init
drivebobdb = DRIVE(protocol = 'default')
# PyTorch dataset
unlabeled_dataset = UnLabeledBinSegDataset(drivebobdb, split='train', transform=unlabeled_transforms)
# SSL Dataset
dataset = SSLBinSegDataset(labeled_dataset, unlabeled_dataset)
COVD-STARE¶
from bob.ip.binseg.configs.datasets.drive608 import dataset as drive
from bob.ip.binseg.configs.datasets.chasedb1608 import dataset as chase
from bob.ip.binseg.configs.datasets.iostarvessel608 import dataset as iostar
from bob.ip.binseg.configs.datasets.hrf608 import dataset as hrf
import torch
#### Config ####
# PyTorch dataset
dataset = torch.utils.data.ConcatDataset([drive,chase,iostar,hrf])
COVD-STARE_SSL¶
from bob.ip.binseg.configs.datasets.drive608 import dataset as drive
from bob.ip.binseg.configs.datasets.chasedb1608 import dataset as chase
from bob.ip.binseg.configs.datasets.iostarvessel608 import dataset as iostar
from bob.ip.binseg.configs.datasets.hrf608 import dataset as hrf
from bob.db.stare import Database as STARE
from bob.ip.binseg.data.transforms import *
import torch
from bob.ip.binseg.data.binsegdataset import BinSegDataset, SSLBinSegDataset, UnLabeledBinSegDataset
#### Config ####
# PyTorch dataset
labeled_dataset = torch.utils.data.ConcatDataset([drive,chase,iostar,hrf])
#### Unlabeled STARE TRAIN ####
unlabeled_transforms = Compose([
Pad((2,1,2,2))
,RandomHFlip()
,RandomVFlip()
,RandomRotation()
,ColorJitter()
,ToTensor()
])
# bob.db.dataset init
starebobdb = STARE(protocol = 'default')
# PyTorch dataset
unlabeled_dataset = UnLabeledBinSegDataset(starebobdb, split='train', transform=unlabeled_transforms)
# SSL Dataset
dataset = SSLBinSegDataset(labeled_dataset, unlabeled_dataset)
COVD-IOSTARVESSEL¶
from bob.ip.binseg.configs.datasets.drive1024 import dataset as drive
from bob.ip.binseg.configs.datasets.stare1024 import dataset as stare
from bob.ip.binseg.configs.datasets.hrf1024 import dataset as hrf
from bob.ip.binseg.configs.datasets.chasedb11024 import dataset as chase
import torch
#### Config ####
# PyTorch dataset
dataset = torch.utils.data.ConcatDataset([drive,stare,hrf,chase])
COVD-IOSTARVESSEL_SSL¶
from bob.ip.binseg.configs.datasets.drive1024 import dataset as drive
from bob.ip.binseg.configs.datasets.stare1024 import dataset as stare
from bob.ip.binseg.configs.datasets.hrf1024 import dataset as hrf
from bob.ip.binseg.configs.datasets.chasedb11024 import dataset as chasedb
from bob.db.iostar import Database as IOSTAR
from bob.ip.binseg.data.transforms import *
import torch
from bob.ip.binseg.data.binsegdataset import BinSegDataset, SSLBinSegDataset, UnLabeledBinSegDataset
#### Config ####
# PyTorch dataset
labeled_dataset = torch.utils.data.ConcatDataset([drive,stare,hrf,chasedb])
#### Unlabeled IOSTAR Train ####
unlabeled_transforms = Compose([
RandomHFlip()
,RandomVFlip()
,RandomRotation()
,ColorJitter()
,ToTensor()
])
# bob.db.dataset init
iostarbobdb = IOSTAR(protocol='default_vessel')
# PyTorch dataset
unlabeled_dataset = UnLabeledBinSegDataset(iostarbobdb, split='train', transform=unlabeled_transforms)
# SSL Dataset
dataset = SSLBinSegDataset(labeled_dataset, unlabeled_dataset)
COVD-HRF¶
from bob.ip.binseg.configs.datasets.drive1168 import dataset as drive
from bob.ip.binseg.configs.datasets.stare1168 import dataset as stare
from bob.ip.binseg.configs.datasets.chasedb11168 import dataset as chase
from bob.ip.binseg.configs.datasets.iostarvessel1168 import dataset as iostar
import torch
#### Config ####
# PyTorch dataset
dataset = torch.utils.data.ConcatDataset([drive,stare,chase,iostar])
COVD-HRF_SSL¶
from bob.ip.binseg.configs.datasets.drive1168 import dataset as drive
from bob.ip.binseg.configs.datasets.stare1168 import dataset as stare
from bob.ip.binseg.configs.datasets.chasedb11168 import dataset as chasedb
from bob.ip.binseg.configs.datasets.iostarvessel1168 import dataset as iostar
from bob.db.hrf import Database as HRF
from bob.ip.binseg.data.transforms import *
import torch
from bob.ip.binseg.data.binsegdataset import BinSegDataset, SSLBinSegDataset, UnLabeledBinSegDataset
#### Config ####
# PyTorch dataset
labeled_dataset = torch.utils.data.ConcatDataset([drive,stare,iostar,chasedb])
#### Unlabeled HRF TRAIN ####
unlabeled_transforms = Compose([
RandomRotation()
,Crop(0,108,2336,3296)
,Resize((1168))
,RandomHFlip()
,RandomVFlip()
,ColorJitter()
,ToTensor()
])
# bob.db.dataset init
hrfbobdb = HRF(protocol='default')
# PyTorch dataset
unlabeled_dataset = UnLabeledBinSegDataset(hrfbobdb, split='train', transform=unlabeled_transforms)
# SSL Dataset
dataset = SSLBinSegDataset(labeled_dataset, unlabeled_dataset)
COVD-CHASEDB1¶
from bob.ip.binseg.configs.datasets.drive960 import dataset as drive
from bob.ip.binseg.configs.datasets.stare960 import dataset as stare
from bob.ip.binseg.configs.datasets.hrf960 import dataset as hrf
from bob.ip.binseg.configs.datasets.iostarvessel960 import dataset as iostar
import torch
#### Config ####
# PyTorch dataset
dataset = torch.utils.data.ConcatDataset([drive,stare,hrf,iostar])
COVD-CHASEDB1_SSL¶
from bob.ip.binseg.configs.datasets.drive960 import dataset as drive
from bob.ip.binseg.configs.datasets.stare960 import dataset as stare
from bob.ip.binseg.configs.datasets.hrf960 import dataset as hrf
from bob.ip.binseg.configs.datasets.iostarvessel960 import dataset as iostar
import torch
#### Config ####
# PyTorch dataset
dataset = torch.utils.data.ConcatDataset([drive,stare,hrf,iostar])
DRIVE¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.db.drive import Database as DRIVE
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.binsegdataset import BinSegDataset
#### Config ####
transforms = Compose([
CenterCrop((544,544))
,RandomHFlip()
,RandomVFlip()
,RandomRotation()
,ColorJitter()
,ToTensor()
])
# bob.db.dataset init
bobdb = DRIVE(protocol = 'default')
# PyTorch dataset
dataset = BinSegDataset(bobdb, split='train', transform=transforms)
DRIVETEST¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.db.drive import Database as DRIVE
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.binsegdataset import BinSegDataset
#### Config ####
transforms = Compose([
CenterCrop((544,544))
,ToTensor()
])
# bob.db.dataset init
bobdb = DRIVE(protocol = 'default')
# PyTorch dataset
dataset = BinSegDataset(bobdb, split='test', transform=transforms)
HRF¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.db.hrf import Database as HRF
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.binsegdataset import BinSegDataset
#### Config ####
transforms = Compose([
Crop(0,108,2336,3296)
,Resize((1168))
,RandomHFlip()
,RandomVFlip()
,RandomRotation()
,ColorJitter()
,ToTensor()
])
# bob.db.dataset init
bobdb = HRF(protocol = 'default')
# PyTorch dataset
dataset = BinSegDataset(bobdb, split='train', transform=transforms)
HRFTEST¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.db.hrf import Database as HRF
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.binsegdataset import BinSegDataset
#### Config ####
transforms = Compose([
Crop(0,108,2336,3296)
,ToTensor()
])
# bob.db.dataset init
bobdb = HRF(protocol = 'default')
# PyTorch dataset
dataset = BinSegDataset(bobdb, split='test', transform=transforms)
IOSTARVESSEL¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.db.iostar import Database as IOSTAR
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.binsegdataset import BinSegDataset
#### Config ####
transforms = Compose([
RandomHFlip()
,RandomVFlip()
,RandomRotation()
,ColorJitter()
,ToTensor()
])
# bob.db.dataset init
bobdb = IOSTAR(protocol='default_vessel')
# PyTorch dataset
dataset = BinSegDataset(bobdb, split='train', transform=transforms)
IOSTARVESSELTEST¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.db.iostar import Database as IOSTAR
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.binsegdataset import BinSegDataset
#### Config ####
transforms = Compose([
ToTensor()
])
# bob.db.dataset init
bobdb = IOSTAR(protocol='default_vessel')
# PyTorch dataset
dataset = BinSegDataset(bobdb, split='test', transform=transforms)
STARE¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.db.stare import Database as STARE
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.binsegdataset import BinSegDataset
#### Config ####
transforms = Compose([
Pad((2,1,2,2))
,RandomHFlip()
,RandomVFlip()
,RandomRotation()
,ColorJitter()
,ToTensor()
])
# bob.db.dataset init
bobdb = STARE(protocol = 'default')
# PyTorch dataset
dataset = BinSegDataset(bobdb, split='train', transform=transforms)
STARETEST¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bob.db.stare import Database as STARE
from bob.ip.binseg.data.transforms import *
from bob.ip.binseg.data.binsegdataset import BinSegDataset
#### Config ####
transforms = Compose([
Pad((2,1,2,2))
,ToTensor()
])
# bob.db.dataset init
bobdb = STARE(protocol = 'default')
# PyTorch dataset
dataset = BinSegDataset(bobdb, split='test', transform=transforms)
Model Configs¶
DRIU¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from torch.optim.lr_scheduler import MultiStepLR
from bob.ip.binseg.modeling.driu import build_driu
import torch.optim as optim
from torch.nn import BCEWithLogitsLoss
from bob.ip.binseg.utils.model_zoo import modelurls
from bob.ip.binseg.modeling.losses import SoftJaccardBCELogitsLoss
from bob.ip.binseg.engine.adabound import AdaBound
##### Config #####
lr = 0.001
betas = (0.9, 0.999)
eps = 1e-08
weight_decay = 0
final_lr = 0.1
gamma = 1e-3
eps = 1e-8
amsbound = False
scheduler_milestones = [900]
scheduler_gamma = 0.1
# model
model = build_driu()
# pretrained backbone
pretrained_backbone = modelurls['vgg16']
# optimizer
optimizer = AdaBound(model.parameters(), lr=lr, betas=betas, final_lr=final_lr, gamma=gamma,
eps=eps, weight_decay=weight_decay, amsbound=amsbound)
# criterion
criterion = SoftJaccardBCELogitsLoss(alpha=0.7)
# scheduler
scheduler = MultiStepLR(optimizer, milestones=scheduler_milestones, gamma=scheduler_gamma)
DRIUBN¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from torch.optim.lr_scheduler import MultiStepLR
from bob.ip.binseg.modeling.driubn import build_driu
import torch.optim as optim
from torch.nn import BCEWithLogitsLoss
from bob.ip.binseg.utils.model_zoo import modelurls
from bob.ip.binseg.modeling.losses import SoftJaccardBCELogitsLoss
from bob.ip.binseg.engine.adabound import AdaBound
##### Config #####
lr = 0.001
betas = (0.9, 0.999)
eps = 1e-08
weight_decay = 0
final_lr = 0.1
gamma = 1e-3
eps = 1e-8
amsbound = False
scheduler_milestones = [900]
scheduler_gamma = 0.1
# model
model = build_driu()
# pretrained backbone
pretrained_backbone = modelurls['vgg16_bn']
# optimizer
optimizer = AdaBound(model.parameters(), lr=lr, betas=betas, final_lr=final_lr, gamma=gamma,
eps=eps, weight_decay=weight_decay, amsbound=amsbound)
# criterion
criterion = SoftJaccardBCELogitsLoss(alpha=0.7)
# scheduler
scheduler = MultiStepLR(optimizer, milestones=scheduler_milestones, gamma=scheduler_gamma)
HED¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from torch.optim.lr_scheduler import MultiStepLR
from bob.ip.binseg.modeling.hed import build_hed
import torch.optim as optim
from bob.ip.binseg.modeling.losses import HEDSoftJaccardBCELogitsLoss
from bob.ip.binseg.utils.model_zoo import modelurls
from bob.ip.binseg.engine.adabound import AdaBound
##### Config #####
lr = 0.001
betas = (0.9, 0.999)
eps = 1e-08
weight_decay = 0
final_lr = 0.1
gamma = 1e-3
eps = 1e-8
amsbound = False
scheduler_milestones = [900]
scheduler_gamma = 0.1
# model
model = build_hed()
# pretrained backbone
pretrained_backbone = modelurls['vgg16']
# optimizer
optimizer = AdaBound(model.parameters(), lr=lr, betas=betas, final_lr=final_lr, gamma=gamma,
eps=eps, weight_decay=weight_decay, amsbound=amsbound)
# criterion
criterion = HEDSoftJaccardBCELogitsLoss(alpha=0.7)
# scheduler
scheduler = MultiStepLR(optimizer, milestones=scheduler_milestones, gamma=scheduler_gamma)
M2UNet¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from torch.optim.lr_scheduler import MultiStepLR
from bob.ip.binseg.modeling.m2u import build_m2unet
import torch.optim as optim
from torch.nn import BCEWithLogitsLoss
from bob.ip.binseg.utils.model_zoo import modelurls
from bob.ip.binseg.modeling.losses import SoftJaccardBCELogitsLoss
from bob.ip.binseg.engine.adabound import AdaBound
##### Config #####
lr = 0.001
betas = (0.9, 0.999)
eps = 1e-08
weight_decay = 0
final_lr = 0.1
gamma = 1e-3
eps = 1e-8
amsbound = False
scheduler_milestones = [900]
scheduler_gamma = 0.1
# model
model = build_m2unet()
# pretrained backbone
pretrained_backbone = modelurls['mobilenetv2']
# optimizer
optimizer = AdaBound(model.parameters(), lr=lr, betas=betas, final_lr=final_lr, gamma=gamma,
eps=eps, weight_decay=weight_decay, amsbound=amsbound)
# criterion
criterion = SoftJaccardBCELogitsLoss(alpha=0.7)
# scheduler
scheduler = MultiStepLR(optimizer, milestones=scheduler_milestones, gamma=scheduler_gamma)
UNet¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from torch.optim.lr_scheduler import MultiStepLR
from bob.ip.binseg.modeling.unet import build_unet
import torch.optim as optim
from torch.nn import BCEWithLogitsLoss
from bob.ip.binseg.utils.model_zoo import modelurls
from bob.ip.binseg.modeling.losses import SoftJaccardBCELogitsLoss
from bob.ip.binseg.engine.adabound import AdaBound
##### Config #####
lr = 0.001
betas = (0.9, 0.999)
eps = 1e-08
weight_decay = 0
final_lr = 0.1
gamma = 1e-3
eps = 1e-8
amsbound = False
scheduler_milestones = [900]
scheduler_gamma = 0.1
# model
model = build_unet()
# pretrained backbone
pretrained_backbone = modelurls['vgg16']
# optimizer
optimizer = AdaBound(model.parameters(), lr=lr, betas=betas, final_lr=final_lr, gamma=gamma,
eps=eps, weight_decay=weight_decay, amsbound=amsbound)
# criterion
criterion = SoftJaccardBCELogitsLoss(alpha=0.7)
# scheduler
scheduler = MultiStepLR(optimizer, milestones=scheduler_milestones, gamma=scheduler_gamma)
DRIUSSL¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from torch.optim.lr_scheduler import MultiStepLR
from bob.ip.binseg.modeling.driu import build_driu
import torch.optim as optim
from torch.nn import BCEWithLogitsLoss
from bob.ip.binseg.utils.model_zoo import modelurls
from bob.ip.binseg.modeling.losses import MixJacLoss
from bob.ip.binseg.engine.adabound import AdaBound
##### Config #####
lr = 0.001
betas = (0.9, 0.999)
eps = 1e-08
weight_decay = 0
final_lr = 0.1
gamma = 1e-3
eps = 1e-8
amsbound = False
scheduler_milestones = [900]
scheduler_gamma = 0.1
# model
model = build_driu()
# pretrained backbone
pretrained_backbone = modelurls['vgg16']
# optimizer
optimizer = AdaBound(model.parameters(), lr=lr, betas=betas, final_lr=final_lr, gamma=gamma,
eps=eps, weight_decay=weight_decay, amsbound=amsbound)
# criterion
criterion = MixJacLoss(lambda_u=0.05, jacalpha=0.7)
# scheduler
scheduler = MultiStepLR(optimizer, milestones=scheduler_milestones, gamma=scheduler_gamma)
DRIUBNSSL¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from torch.optim.lr_scheduler import MultiStepLR
from bob.ip.binseg.modeling.driubn import build_driu
import torch.optim as optim
from torch.nn import BCEWithLogitsLoss
from bob.ip.binseg.utils.model_zoo import modelurls
from bob.ip.binseg.modeling.losses import MixJacLoss
from bob.ip.binseg.engine.adabound import AdaBound
##### Config #####
lr = 0.001
betas = (0.9, 0.999)
eps = 1e-08
weight_decay = 0
final_lr = 0.1
gamma = 1e-3
eps = 1e-8
amsbound = False
scheduler_milestones = [900]
scheduler_gamma = 0.1
# model
model = build_driu()
# pretrained backbone
pretrained_backbone = modelurls['vgg16_bn']
# optimizer
optimizer = AdaBound(model.parameters(), lr=lr, betas=betas, final_lr=final_lr, gamma=gamma,
eps=eps, weight_decay=weight_decay, amsbound=amsbound)
# criterion
criterion = MixJacLoss(lambda_u=0.05, jacalpha=0.7)
# scheduler
scheduler = MultiStepLR(optimizer, milestones=scheduler_milestones, gamma=scheduler_gamma)
M2UNetSSL¶
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from torch.optim.lr_scheduler import MultiStepLR
from bob.ip.binseg.modeling.m2u import build_m2unet
import torch.optim as optim
from torch.nn import BCEWithLogitsLoss
from bob.ip.binseg.utils.model_zoo import modelurls
from bob.ip.binseg.modeling.losses import MixJacLoss
from bob.ip.binseg.engine.adabound import AdaBound
##### Config #####
lr = 0.001
betas = (0.9, 0.999)
eps = 1e-08
weight_decay = 0
final_lr = 0.1
gamma = 1e-3
eps = 1e-8
amsbound = False
scheduler_milestones = [900]
scheduler_gamma = 0.1
# model
model = build_m2unet()
# pretrained backbone
pretrained_backbone = modelurls['mobilenetv2']
# optimizer
optimizer = AdaBound(model.parameters(), lr=lr, betas=betas, final_lr=final_lr, gamma=gamma,
eps=eps, weight_decay=weight_decay, amsbound=amsbound)
# criterion
criterion = MixJacLoss(lambda_u=0.05, jacalpha=0.7)
# scheduler
scheduler = MultiStepLR(optimizer, milestones=scheduler_milestones, gamma=scheduler_gamma)