google-research / pix2seq

Pix2Seq codebase: multi-tasks with generative modeling (autoregressive and diffusion)
Apache License 2.0
857 stars 71 forks source link

Question about inference #15

Open SY-Xuan opened 2 years ago

SY-Xuan commented 2 years ago

During inference, the token (5-th) that is corresponded to the object class may be classified to the coordinates. In the other hand, the token that is corresponded to the coordinates still has chance to be classified to the class of the object. How to deal with such situation? Thanks a lot.

chentingpc commented 2 years ago

you can offset logits before sampling if you want to disable certain predictions (e.g. set -1e9 for logits that correspond to class/coordinates). but we find that just free sampling is fine.

SY-Xuan commented 2 years ago

Thanks for your kindly replying!