xuanyuzhang21 / EditGuard

[CVPR 2024🔥] EditGuard: Versatile Image Watermarking for Tamper Localization and Copyright Protection
https://xuanyuzhang21.github.io/project/editguard/
174 stars 12 forks source link

BUG or problem? #11

Open sfsdhbjfsdhbf opened 2 days ago

sfsdhbjfsdhbf commented 2 days ago

Hello author, I tried to reproduce the training process but encountered the following issues.

command cd code python train_bit.py ....

../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [494,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [495,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [496,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [497,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [498,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [499,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [501,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [502,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [504,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [505,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [506,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [507,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [509,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [510,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed. ../aten/src/ATen/native/cuda/Distributions.cu:50: operator(): block: [134,0,0], thread: [511,0,0] Assertion lambda >= 0 && "invalid Poisson rate, expected rate to be non-negative" failed.

This is caused by the Poisson distribution. But I do not understand why the value of y_flow is negative. I am using default settings. Can I limit the lower bound of Poisson distribution to 0

sfsdhbjfsdhbf commented 2 days ago

sorry why the value of y_frow is negative.

sfsdhbjfsdhbf commented 2 days ago

I change the code in IBSN in line 209

y_forw = container

    y_forw = torch.clamp(container, 0, 1) 

is it ok?