raywzy / ICT

High-Fidelity Pluralistic Image Completion with Transformers (ICCV 2021)
312 stars 43 forks source link

num_sample in sample_mask function #12

Closed samuro95 closed 3 years ago

samuro95 commented 3 years ago

Hi,

I am confused by the sample_mask function in transformer/utils/util.py, it seems that it does not use the argument num_sample but keeps num_sample=1, is it normal ?

Moreover, you use top_k=40 but the paper uses top_k=50. What is the best choice ?

Thanks,

raywzy commented 3 years ago

Hi,

transformer/utils/util.py is --num_sample agnostic because this option is performed in the batch dimension, so it is normal. For top_k, you could try different values by yourself. Generally, larger top_k will lead to better diversities since the sampling range is broaden, and smaller top_k will lead to more stable sample quality, which you could choose based on your own preference.

samuro95 commented 3 years ago

Thanks !!