bcmi / SLBR-Visible-Watermark-Removal

[ACM MM 2021] Visible Watermark Removal via Self-calibrated Localization and Background Refinement
209 stars 35 forks source link

对模型设计的一个疑问 #42

Open Xelawk opened 3 months ago

Xelawk commented 3 months ago

为什么是这样:

        reconstructed_image = torch.tanh(im)  # [-1, 1]
        if self.long_skip:
            reconstructed_image = (reconstructed_image + synthesized).clamp(0,1)

而不是这样:


        if self.long_skip:
            reconstructed_image = reconstructed_image + synthesized
            reconstructed_image = torch.sigmoid(reconstructed_image)