DECA
DECA copied to clipboard
How do you know the model has converged?
Hi, thank you for releasing the code! I have some questions about the training process:
- How long do you train the model for? From the configs it seems that you train for 1~2 epochs in total, but how is this number decided?
- How do you know it has converged? By converge I mean the validation loss is at its lowest point.
- How do you know the model is not overfitting or underfitting?
- What is the validation loss function? Is it the same as the training loss function?
Thank you for your time!
In the validation step, all the code does is visualizing the results. How do we know quantitatively that the model is improving?
def validation_step(self):
self.deca.eval()
try:
batch = next(self.val_iter)
except:
self.val_iter = iter(self.val_dataloader)
batch = next(self.val_iter)
images = batch['image'].cuda(); images = images.view(-1, images.shape[-3], images.shape[-2], images.shape[-1])
with torch.no_grad():
codedict = self.deca.encode(images)
opdict, visdict = self.deca.decode(codedict)
savepath = os.path.join(self.cfg.output_dir, self.cfg.train.val_vis_dir, f'{self.global_step:08}.jpg')
util.visualize_grid(visdict, savepath)
Were you able to train DECA?