Пример #1
0
 def __init__(self,
              num_classes=1,
              img_sz=128,
              model_train_loss=True,
              bs: int = 1,
              steps_per_epoch: int = 0,
              lr: float = 1e-2,
              noisy=False,
              calc_metrics=False,
              **kwargs):
     LightningModule.__init__(self)
     self.num_classes = num_classes
     self.model_train_loss = model_train_loss
     self.img_sz = img_sz
     self.lr = lr
     self.bs = bs
     self.steps_per_epoch = steps_per_epoch
     self.noisy = noisy
     self.calc_metrics = calc_metrics
     self.model = self.create_model(num_classes=num_classes,
                                    img_sz=img_sz,
                                    lr=lr,
                                    bs=bs,
                                    steps_per_epoch=steps_per_epoch,
                                    **kwargs)
Пример #2
0
 def __init__(self):
     LightningModule.__init__(self)