def __init__(self, opt, model, testnames): self.opt = opt self.model = model self.testnames = testnames self.loss_fn1 = m.Dice_Loss() self.loss_fn2 = torch.nn.BCELoss(size_average=True) self.loss_fn3 = torch.nn.MSELoss(size_average=True)
def __init__(self, opt, model, testdata, setsize, thresholds): self.opt = opt self.model = model self.testdata = testdata self.setsize = setsize self.loss_fn1 = m.Dice_Loss() self.loss_fn2 = torch.nn.BCELoss(size_average=True) self.loss_fn3 = torch.nn.MSELoss(size_average=True) self.thresholds = thresholds
def __init__(self, opt, model, testnames, dataset): self.opt = opt self.model = model self.testnames = testnames self.dataset = dataset self.loss_fn1 = m.Dice_Loss() self.loss_fn2 = torch.nn.BCELoss(size_average=True) self.loss_fn3 = torch.nn.MSELoss(size_average=True) self.deployloader = DataLoader(self.dataset, batch_size=1, shuffle=False)
def __init__(self, opt, model, traindata, valdata, trainsetsize, valsetsize, checkpoint): self.opt = opt self.model = model self.traindata = traindata self.valdata = valdata self.trainsetsize = trainsetsize self.valsetsize = valsetsize self.loss_fn1 = m.Dice_Loss() #self.loss_fn2 = torch.nn.BCELoss(size_average=True) #self.loss_fn3 = torch.nn.MSELoss(size_average=True) self.loss_fn2 = torch.nn.BCELoss(size_average=False) self.loss_fn3 = torch.nn.MSELoss(size_average=False) self.checkpoint = checkpoint self.sched = j.combine_scheds([0.3, 0.7], [j.sched_cos(0.0001, 0.6), j.sched_cos(0.6, 2e-06)])