google-research / pix2seq

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

Generate different inference results #39

Closed zkyseu closed 1 year ago

zkyseu commented 1 year ago

Hi, thanks for your wonderful work! I have a question that whether pix2seq can generate different inference results by setting random seed? If it can, how can i modify the code?

chentingpc commented 1 year ago

You can simply adjust the top_p and/or top_k and sample multiple times. Please see nucleus sampling widely used in language modeling.

On Wed, Jun 14, 2023 at 5:45 AM zkyseu @.***> wrote:

Hi, thanks for your wonderful work! I have a question that whether pix2seq can generate different inference results by setting random seed? If it can, how can i modify the code?

— Reply to this email directly, view it on GitHub https://github.com/google-research/pix2seq/issues/39, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKERUK2LI773XAGKIQRGH3XLGXAJANCNFSM6AAAAAAZGJ4GWA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

zkyseu commented 1 year ago

Thanks!