simonalexanderson / ListenDenoiseAction

Code to reproduce the results for our SIGGRAPH 2023 paper "Listen Denoise Action"
Other
160 stars 22 forks source link

In the inference stage, why "standardize input function" use input_means(models) instead of means of input_tensor(input)? #10

Closed lzyplayer closed 11 months ago

lzyplayer commented 11 months ago

In the inference stage, it seems that the mean and standard deviation used for standardization are extracted from the model instead of calculating the input input_tensor, so the normalized result is not a distribution with a mean of 0 and a standard deviation of 1. , which is inconsistent with the description in the first paragraph of the appendix of the paper. Did I miss something? /model/BaseModel.py line 37

    # standarize input
    def standardizeInput(self, input_tensor):
        return ((input_tensor - self.input_means.type_as(input_tensor)) / self.input_scales.type_as(input_tensor))

    # standarize output
    def standardizeOutput(self, output_tensor):
        return ((output_tensor - self.output_means.type_as(output_tensor)) / self.output_scales.type_as(output_tensor))

    # Add scale and means to output
    def destandardizeInput(self, input_tensor):
        return (input_tensor * self.input_scales.type_as(input_tensor) + self.input_means.type_as(input_tensor))

    # Add scale and means to output
    def destandardizeOutput(self, predictions):
        return (predictions * self.output_scales.type_as(predictions) + self.output_means.type_as(predictions))
lzyplayer commented 11 months ago

was my mistake, normalizing only on the test set doesn't make sense