Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

About the training loss #19

Open
2410183509 opened this issue Aug 27, 2023 · 1 comment
Open

About the training loss #19

2410183509 opened this issue Aug 27, 2023 · 1 comment

Comments

@2410183509
Copy link

Dear author
Thanks for sharing the code. I'm currently try to implemente you DMR model in my own dataset. In your ACM MM2020 paper, the training loss is calculated according to the downsampled and the upsampled point cloud. But in your implementation, the loss may calculated only according to the final upsampled point cloud. The part of the code in 'models/denoise.py' line 114 is as follwos:

def training_step(self, batch, batch_idx):
        denoised = self.forward(batch['pos'])
        noiseless = batch['clean']
        normals = batch['normal']

        loss = self.model.get_loss(gts=noiseless, preds=denoised, normals=normals, inputs=batch['pos'])

        output = {
            'loss': loss,
            'log': {
                'loss_train/loss': loss.sum(),
            }
        }
        return output

where this part of code is used for one train forward iteration and the variable 'loss' is the training loss. However, when I turn to the defination of function 'self.model.getloss()' in line 119 as follows:

def get_loss(self, gts, normals, inputs, **kwargs):
        loss = self.loss_rec(preds=self.preds, gts=gts, normals=normals, inputs=inputs, epoch=self.epoch)
        if self.loss_ds is not None:
            loss = loss + self.loss_ds(preds=self.preds, gts=gts, normals=normals, inputs=inputs, epoch=self.epoch)
        return loss

where the loss is calculated using 'self.loss_rec()' and 'self.loss_ds'. The parameters of the function are the same and the only useful parameter is the 'preds' and 'gts' representing the predicted point cloud and the ground truth point cloud. But both of the parameter 'preds' is assigned by 'self.preds' where this is the final upsampled point cloud while the 'self.adjusted' in 'models/net.py' line 58 representing the downsampled point cloud. I wonder if the parameter 'preds' in 'self.loss_rec' should be assigned by 'self.adjusted'. So I would like to ask if there is anything that is inconsistent with the implementation in the paper or something that I didn't notice or misunderstood.

@gaoxlAC
Copy link

gaoxlAC commented May 29, 2024

Hello, do you know how to make the training set for this model (DMRDenoise)? Especially the calculation method of point cloud normal vectors. I am very eager to know your answer, thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants