Alibaba-Gemini-Lab / OpenCheetah

185 stars 50 forks source link

Solve "filter with all zero is not supported" issue. #38

Closed caiyifei2008 closed 1 month ago

caiyifei2008 commented 4 months ago

Hi,

When I was trying to test additional model I met the issue "filter with all zero is not supported". This issue usually raises where the filter/kernel is 1x1. My guess is: this/one small parameter in the filter/kernel is converted into int(0) when model was proccessed to .inp. And it causes the issue "filter with all zero is not supported".

If this guess is correct. Any plan to solve this isuue? My plan:

  1. to replace zero parameter with a non-zero tiny value. do it on the model after or before "proccessed to .inp"?
  2. modify the codes to make function work with all-zero filter. Probably a big project. I have meeting some 'std::logic_error: ciphertext data is invalid' when I was trying this.

So, any suggestion?

Thanks a lot, in advance.

fionser commented 4 months ago

See the Q&A.md

Q: The program throws result ciphertext is transparent logic_error

A: That is a runtime error from the SEAL. Usually, when multiplying 0 with a ciphertext will raise that error. If we just want to a dry-run, then we can just turn of the flag -DSEAL_THROW_ON_TRANSPARENT_CIPHERTEXT in scripts/build-deps.sh and then rebuild SEAL.
caiyifei2008 commented 4 months ago

OK. Thanks.