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

About the training loss #19

Description

@2410183509

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions